From: Johan Hovold Date: Tue, 19 Jan 2016 11:51:05 +0000 (+0100) Subject: greybus: connection: disable operations on enable errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=192bee4b1a7adbf16d12721c77d6268c76428323;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git greybus: connection: disable operations on enable errors Make sure to cancel all (incoming) operations when failing to enable a connection. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- 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);