From 886c6069bc0e16b7215b326831478ed700451038 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Tue, 14 Jul 2015 15:43:29 +0200 Subject: [PATCH] greybus: operation: suppress response submission on connection tear down Suppress response submission on connection tear down as we do with requests. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/operation.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 0adb72773d8a..2729b486d68d 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -705,6 +705,9 @@ static int gb_operation_response_send(struct gb_operation *operation, struct gb_connection *connection = operation->connection; int ret; + if (connection->state != GB_CONNECTION_STATE_ENABLED) + return -ENOTCONN; + if (!operation->response && !gb_operation_is_unidirectional(operation)) { if (!gb_operation_response_alloc(operation, 0)) -- 2.39.2