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: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
21dcc9e503
commit
a6e0363cb0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user