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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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))