greybus: nullify dangling pointers

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Viresh Kumar 2014-11-14 17:25:01 +05:30 committed by Greg Kroah-Hartman
parent 837b3b7c04
commit f66832dae0
3 changed files with 3 additions and 0 deletions

View File

@ -367,6 +367,7 @@ int gb_ap_init(void)
void gb_ap_exit(void)
{
destroy_workqueue(ap_workqueue);
ap_workqueue = NULL;
}

View 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;
}

View 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;
}