From: Perry Hung Date: Wed, 14 Jan 2015 21:19:27 +0000 (-0500) Subject: greybus: gb_operation: drop operation refcount on cancel X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1721 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a1f2e40b1a30c2b8a2dfc40d859550081195b57a;p=karo-tx-linux.git greybus: gb_operation: drop operation refcount on cancel An extra reference is taken out on an operation in gb_operation_request_send(). If the response never arrives, we need to put back the reference. Signed-off-by: Perry Hung Tested-by: Mitchell Tasman Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 0ee44751fb62..82ff306d15e3 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -895,6 +895,7 @@ void gb_operation_cancel(struct gb_operation *operation, int errno) gb_message_cancel(operation->request); gb_message_cancel(operation->response); } + gb_operation_put(operation); } /**