summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/operation.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-07-14 15:43:29 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2015-07-15 12:39:13 -0700
commit886c6069bc0e16b7215b326831478ed700451038 (patch)
tree2fe2092e2af5f5dfb8ae04cae579e182d019838b /drivers/staging/greybus/operation.c
parentc600e535a72d0d3ec4b3e8e323e5602cbc49004e (diff)
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 <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/operation.c')
-rw-r--r--drivers/staging/greybus/operation.c3
1 files changed, 3 insertions, 0 deletions
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))