From: Johan Hovold Date: Tue, 3 Nov 2015 11:11:28 +0000 (+0100) Subject: greybus: connection: fix potential null-deref in connection create X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6e0363cb06989e9584820d3f5c0faad1cc35eae;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 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 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;