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

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: 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 a6e0363c
......@@ -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);
......
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