Commit 583c3117 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: handle data send errors in workqueue

The data sent callback can execute in atomic context.  If an error
occurred, we shouldn't be completing the operation right then and
there.  Instead, hand it off to the operation workqueue to complete
the operation.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent ee637a9b
......@@ -506,9 +506,8 @@ greybus_data_sent(struct greybus_host_device *hd, void *header, int status)
/* XXX Right now we assume we're an outgoing request */
message = gb_hd_message_find(hd, header);
operation = message->operation;
gb_connection_err(operation->connection, "send error %d\n", status);
operation->errno = status;
gb_operation_complete(operation);
queue_work(gb_operation_workqueue, &operation->work);
}
EXPORT_SYMBOL_GPL(greybus_data_sent);
......
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