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

greybus: operation: complete operations on cancellation

Make sure to call the operation completion callback also when the
operation is being cancelled.

The completion callback may need to release resources allocated at
submission and the driver should be informed that the operation has
failed due to cancellation.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent fd7134a3
......@@ -901,8 +901,7 @@ void gb_operation_cancel(struct gb_operation *operation, int errno)
} else {
if (gb_operation_result_set(operation, errno)) {
gb_message_cancel(operation->request);
gb_operation_put_active(operation);
gb_operation_put(operation);
queue_work(gb_operation_workqueue, &operation->work);
}
}
......
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