greybus: connection: fix version-request error handling
authorJohan Hovold <johan@hovoldconsulting.com>
Fri, 8 Jan 2016 19:13:40 +0000 (20:13 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 9 Jan 2016 08:41:46 +0000 (00:41 -0800)
Use the host device and connection name when logging errors as the
version-request helper must not assume that all connection have a
bundle.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c

index 5a24dbe..b356ee0 100644 (file)
@@ -378,8 +378,9 @@ static int gb_connection_protocol_get_version(struct gb_connection *connection)
 
        ret = gb_protocol_get_version(connection);
        if (ret) {
-               dev_err(&connection->bundle->dev,
-                       "failed to get protocol version: %d\n", ret);
+               dev_err(&connection->hd->dev,
+                       "%s: failed to get protocol version: %d\n",
+                       connection->name, ret);
                return ret;
        }