From a6e0363cb06989e9584820d3f5c0faad1cc35eae Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Tue, 3 Nov 2015 12:11:28 +0100 Subject: [PATCH] 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 --- drivers/staging/greybus/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index e16ed4e..c3cd69c 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; -- 2.7.4