summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-11-03 12:11:29 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-11-04 20:20:23 -0800
commit21dcc9e50339642dfd241fa081a9b2ab6a34221a (patch)
treec3f75d709e37d29c92e091fcca35d98d5c2a94b6 /drivers/staging/greybus/connection.c
parente6c88bf31e9ef22e3503e0f905cb6fa3c8c53f26 (diff)
downloadlinux-stable-21dcc9e50339642dfd241fa081a9b2ab6a34221a.tar.gz
linux-stable-21dcc9e50339642dfd241fa081a9b2ab6a34221a.tar.bz2
linux-stable-21dcc9e50339642dfd241fa081a9b2ab6a34221a.zip
greybus: connection: fix potential null-deref in hd_cport_enable
Use parent of host device for error messages as the connections bundle may be NULL. 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 c70518ed504f..e16ed4eafd03 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -196,7 +196,7 @@ static int gb_connection_hd_cport_enable(struct gb_connection *connection)
ret = hd->driver->cport_enable(hd, connection->hd_cport_id);
if (ret) {
- dev_err(&connection->bundle->dev,
+ dev_err(hd->parent,
"failed to enable host cport: %d\n", ret);
return ret;
}