greybus: gb_operation: drop operation refcount on cancel
authorPerry Hung <perry@leaflabs.com>
Wed, 14 Jan 2015 21:19:27 +0000 (16:19 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 16 Jan 2015 19:09:45 +0000 (11:09 -0800)
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 <perry@leaflabs.com>
Tested-by: Mitchell Tasman <tasman@leaflabs.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c

index 0ee4475..82ff306 100644 (file)
@@ -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);
 }
 
 /**