From: Johan Hovold Date: Tue, 14 Jul 2015 13:43:29 +0000 (+0200) Subject: greybus: operation: suppress response submission on connection tear down X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=886c6069bc0e16b7215b326831478ed700451038;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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))