summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-01-19 12:51:05 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-19 12:12:40 -0800
commit192bee4b1a7adbf16d12721c77d6268c76428323 (patch)
treeeaa9525058a37b50fdeaa95fc8752d06d76234bc /drivers
parent520c6eae991299720bcc0668326fb1e3a4bba3ba (diff)
greybus: connection: disable operations on enable errors
Make sure to cancel all (incoming) operations when failing to enable a connection. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/connection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index f782e8b4a594..0159fbd9d78e 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -412,6 +412,7 @@ int gb_connection_enable(struct gb_connection *connection,
err_svc_destroy:
spin_lock_irq(&connection->lock);
connection->state = GB_CONNECTION_STATE_DISABLED;
+ gb_connection_cancel_operations(connection, -ESHUTDOWN);
spin_unlock_irq(&connection->lock);
gb_connection_svc_connection_destroy(connection);