]> git.karo-electronics.de Git - linux-beck.git/commitdiff
greybus: connection: disable operations on enable errors
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 19 Jan 2016 11:51:05 +0000 (12:51 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 19 Jan 2016 20:12:40 +0000 (12:12 -0800)
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>
drivers/staging/greybus/connection.c

index f782e8b4a594af03f5b59df74673162599d05cb3..0159fbd9d78eb3022594ffe7b0294c638c5983e1 100644 (file)
@@ -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);