summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-11-03 12:11:28 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-11-04 20:20:23 -0800
commita6e0363cb06989e9584820d3f5c0faad1cc35eae (patch)
treeb1a3c124f5371d11b9f5fd16d8e45b6d677e7437 /drivers/staging/greybus/connection.c
parent21dcc9e50339642dfd241fa081a9b2ab6a34221a (diff)
downloadlinux-stable-a6e0363cb06989e9584820d3f5c0faad1cc35eae.tar.gz
linux-stable-a6e0363cb06989e9584820d3f5c0faad1cc35eae.tar.bz2
linux-stable-a6e0363cb06989e9584820d3f5c0faad1cc35eae.zip
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>
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 e16ed4eafd03..c3cd69c0f3ed 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -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;