From: Johan Hovold Date: Tue, 3 Nov 2015 11:11:27 +0000 (+0100) Subject: greybus: connection: fix potential null-deref when binding protocol X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5245a90564b0c3f781e0c60cdbeb3b3b34c970df;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: connection: fix potential null-deref when binding protocol We can have connections without bundles so we must not use the bundle device for error messages when failing to look up a 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 c3cd69c0f3ed..294e72e8e1c0 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -510,7 +510,7 @@ int gb_connection_bind_protocol(struct gb_connection *connection) connection->major, connection->minor); if (!protocol) { - dev_warn(&connection->bundle->dev, + dev_warn(connection->hd->parent, "protocol 0x%02hhx version %hhu.%hhu not found\n", connection->protocol_id, connection->major, connection->minor);