Commit a6e0363c authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: connection: fix potential null-deref in connection create

We allow connections without bundles so we must not use the bundle
device for error messages after binding the protocol.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 21dcc9e5
......@@ -170,7 +170,7 @@ gb_connection_create_range(struct greybus_host_device *hd,
retval = gb_connection_bind_protocol(connection);
if (retval) {
dev_err(&bundle->dev, "%d: failed to bind protocol: %d\n",
dev_err(parent, "%d: failed to bind protocol: %d\n",
cport_id, retval);
gb_connection_destroy(connection);
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment