From: Johan Hovold Date: Tue, 3 Nov 2015 11:11:29 +0000 (+0100) Subject: greybus: connection: fix potential null-deref in hd_cport_enable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=21dcc9e50339642dfd241fa081a9b2ab6a34221a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- 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; }