From: Johan Hovold Date: Tue, 14 Jul 2015 13:43:27 +0000 (+0200) Subject: greybus: operation: complete operations on cancellation X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1379 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=db1481ba7f36c2f5f74d19918bdf315a1ef8226b;p=karo-tx-linux.git 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: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 5e8ea0289053..1e181d59c9b7 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -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); } }