Commit 886c6069 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: operation: suppress response submission on connection tear down

Suppress response submission on connection tear down as we do with
requests.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent c600e535
...@@ -705,6 +705,9 @@ static int gb_operation_response_send(struct gb_operation *operation, ...@@ -705,6 +705,9 @@ static int gb_operation_response_send(struct gb_operation *operation,
struct gb_connection *connection = operation->connection; struct gb_connection *connection = operation->connection;
int ret; int ret;
if (connection->state != GB_CONNECTION_STATE_ENABLED)
return -ENOTCONN;
if (!operation->response && if (!operation->response &&
!gb_operation_is_unidirectional(operation)) { !gb_operation_is_unidirectional(operation)) {
if (!gb_operation_response_alloc(operation, 0)) if (!gb_operation_response_alloc(operation, 0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment