1
0
Fork 0

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>
hifive-unleashed-5.1
Johan Hovold 2016-01-19 12:51:05 +01:00 committed by Greg Kroah-Hartman
parent 520c6eae99
commit 192bee4b1a
1 changed files with 1 additions and 0 deletions

View 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);