greybus: nullify dangling pointers
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 14 Nov 2014 11:55:01 +0000 (17:25 +0530)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 14 Nov 2014 21:32:27 +0000 (13:32 -0800)
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/ap.c
drivers/staging/greybus/debugfs.c
drivers/staging/greybus/gbuf.c

index a8cd7e7..9d743f2 100644 (file)
@@ -367,6 +367,7 @@ int gb_ap_init(void)
 void gb_ap_exit(void)
 {
        destroy_workqueue(ap_workqueue);
+       ap_workqueue = NULL;
 }
 
 
index ef292f4..4755a36 100644 (file)
@@ -26,4 +26,5 @@ int gb_debugfs_init(void)
 void gb_debugfs_cleanup(void)
 {
        debugfs_remove_recursive(gb_debug_root);
+       gb_debug_root = NULL;
 }
index 8b5a438..d5cfb38 100644 (file)
@@ -136,4 +136,5 @@ int gb_gbuf_init(void)
 void gb_gbuf_exit(void)
 {
        kmem_cache_destroy(gbuf_head_cache);
+       gbuf_head_cache = NULL;
 }