From 837b3b7c04c1df9dbf5e8dc4b15aaa28e7b6439b Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Fri, 14 Nov 2014 17:25:00 +0530 Subject: [PATCH] greybus: operation: free resources in the reverse order of allocation Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/operation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 7fcd8e4..603697e 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -493,8 +493,8 @@ int gb_operation_init(void) void gb_operation_exit(void) { - kmem_cache_destroy(gb_operation_cache); - gb_operation_cache = NULL; destroy_workqueue(gb_operation_recv_workqueue); gb_operation_recv_workqueue = NULL; + kmem_cache_destroy(gb_operation_cache); + gb_operation_cache = NULL; } -- 2.7.4