From f66832dae0ad61732d07c40a3c81adbc935fa1b3 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Fri, 14 Nov 2014 17:25:01 +0530 Subject: [PATCH] greybus: nullify dangling pointers Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/ap.c | 1 + drivers/staging/greybus/debugfs.c | 1 + drivers/staging/greybus/gbuf.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/staging/greybus/ap.c b/drivers/staging/greybus/ap.c index a8cd7e7cdd60..9d743f28e08e 100644 --- a/drivers/staging/greybus/ap.c +++ b/drivers/staging/greybus/ap.c @@ -367,6 +367,7 @@ int gb_ap_init(void) void gb_ap_exit(void) { destroy_workqueue(ap_workqueue); + ap_workqueue = NULL; } diff --git a/drivers/staging/greybus/debugfs.c b/drivers/staging/greybus/debugfs.c index ef292f43db45..4755a36d0522 100644 --- a/drivers/staging/greybus/debugfs.c +++ b/drivers/staging/greybus/debugfs.c @@ -26,4 +26,5 @@ int gb_debugfs_init(void) void gb_debugfs_cleanup(void) { debugfs_remove_recursive(gb_debug_root); + gb_debug_root = NULL; } diff --git a/drivers/staging/greybus/gbuf.c b/drivers/staging/greybus/gbuf.c index 8b5a438e3b01..d5cfb38d6d75 100644 --- a/drivers/staging/greybus/gbuf.c +++ b/drivers/staging/greybus/gbuf.c @@ -136,4 +136,5 @@ int gb_gbuf_init(void) void gb_gbuf_exit(void) { kmem_cache_destroy(gbuf_head_cache); + gbuf_head_cache = NULL; }