]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: improve some error messages
authorAlex Elder <elder@linaro.org>
Wed, 5 Nov 2014 22:03:12 +0000 (16:03 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 5 Nov 2014 22:12:26 +0000 (14:12 -0800)
Add a few error messages to help explain the reason for failures.
Add a missing space in a message in svc_management().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/ap.c
drivers/staging/greybus/connection.c
drivers/staging/greybus/interface.c
drivers/staging/greybus/module.c

index 24a15e9c60090d90b6d9cef1097bf93085fadefc..a8cd7e7cdd60eb49cbfe389b5e716837410c0679 100644 (file)
@@ -150,7 +150,7 @@ static void svc_management(struct svc_function_unipro_management *management,
                                management->link_up.interface_id,
                                management->link_up.device_id);
                if (ret)
-                       dev_err(hd->parent, "error %d initializing"
+                       dev_err(hd->parent, "error %d initializing "
                                "module %hhu interface %hhu\n",
                                ret, management->link_up.module_id,
                                management->link_up.interface_id);
index c4b650522ac2c32006e934138c5fc0dea02b8e9b..1a8f53ef34cf69d5368e99f1d7549882adc4dd9b 100644 (file)
@@ -164,6 +164,7 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface,
 
        INIT_LIST_HEAD(&connection->protocol_links);
        if (!gb_protocol_get(connection, protocol_id)) {
+               pr_err("protocol 0x%02hhx not found\n", protocol_id);
                kfree(connection);
                return NULL;
        }
@@ -191,6 +192,8 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface,
 
        retval = device_add(&connection->dev);
        if (retval) {
+               pr_err("failed to add connection device for cport 0x%04hx\n",
+                       cport_id);
                gb_connection_hd_cport_id_free(connection);
                gb_protocol_put(connection);
                put_device(&connection->dev);
index 163cdc439e0c73848f7b85257017bccc8e484093..eb63f638fc2c574af671ddf6759fe27e67319ad2 100644 (file)
@@ -78,6 +78,8 @@ gb_interface_create(struct gb_module *gmod, u8 interface_id)
 
        retval = device_add(&interface->dev);
        if (retval) {
+               pr_err("failed to add interface device for id 0x%02hhx\n",
+                       interface_id);
                kfree(interface);
                return NULL;
        }
index 3a64a2b3eb065173c02e0f8426d6a5099abb5eb0..9cf98cd8d53d7b5b58ec34d55936305cc29e3d90 100644 (file)
@@ -100,6 +100,8 @@ struct gb_module *gb_module_create(struct greybus_host_device *hd, u8 module_id)
 
        retval = device_add(&gmod->dev);
        if (retval) {
+               pr_err("failed to add module device for id 0x%02hhx\n",
+                       module_id);
                put_device(&gmod->dev);
                return NULL;
        }