summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-31 17:21:15 +0530
committerJohan Hovold <johan@hovoldconsulting.com>2015-09-03 15:41:33 +0200
commit6c0d57b4e612c00b14852c2f8b179d518462ea6c (patch)
treec97f9d82c632a35b2ebead7c24a2d710eb422c1d /drivers/staging/greybus/connection.c
parent50bb9ccaa0e12823e7f225ce1571d4ae3d1f83e0 (diff)
downloadlinux-stable-6c0d57b4e612c00b14852c2f8b179d518462ea6c.tar.gz
linux-stable-6c0d57b4e612c00b14852c2f8b179d518462ea6c.tar.bz2
linux-stable-6c0d57b4e612c00b14852c2f8b179d518462ea6c.zip
greybus: connection: protocol can be NULL in gb_connection_exit()
gb_connection_exit() is getting called from gb_connection_destroy() now, which will get called from failure path of gb_connection_create_range() (in a later commit). And at that point connection->protocol will be NULL. Don't print an error message if this happens in gb_connection_exit(). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index d0642bcd7600..466ea36da0aa 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -396,10 +396,8 @@ disconnect:
static void gb_connection_exit(struct gb_connection *connection)
{
- if (!connection->protocol) {
- dev_warn(&connection->dev, "exit without protocol.\n");
+ if (!connection->protocol)
return;
- }
spin_lock_irq(&connection->lock);
if (connection->state != GB_CONNECTION_STATE_ENABLED) {