summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-11-03 12:11:27 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-11-04 20:20:23 -0800
commit5245a90564b0c3f781e0c60cdbeb3b3b34c970df (patch)
treed1ea03bb6b9d72b216b3f87ab38d80ffc2735ad6 /drivers/staging/greybus/connection.c
parenta6e0363cb06989e9584820d3f5c0faad1cc35eae (diff)
downloadlinux-stable-5245a90564b0c3f781e0c60cdbeb3b3b34c970df.tar.gz
linux-stable-5245a90564b0c3f781e0c60cdbeb3b3b34c970df.tar.bz2
linux-stable-5245a90564b0c3f781e0c60cdbeb3b3b34c970df.zip
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>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index c3cd69c0f3ed..294e72e8e1c0 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -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);