greybus: connection: fix potential null-deref when binding protocol
We can have connections without bundles so we must not use the bundle device for error messages when failing to look up a 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
a6e0363cb0
commit
5245a90564
@ -510,7 +510,7 @@ int gb_connection_bind_protocol(struct gb_connection *connection)
|
||||
connection->major,
|
||||
connection->minor);
|
||||
if (!protocol) {
|
||||
dev_warn(&connection->bundle->dev,
|
||||
dev_warn(connection->hd->parent,
|
||||
"protocol 0x%02hhx version %hhu.%hhu not found\n",
|
||||
connection->protocol_id,
|
||||
connection->major, connection->minor);
|
||||
|
Loading…
x
Reference in New Issue
Block a user