提交 435a80f6 编写于 作者: D Doug Warzecha 提交者: Linus Torvalds

[PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit

smi_data_buf_free() references dcdbas_pdev when calling
dma_free_coherent().  In dcdbas_exit(), smi_data_buf_free() is called after
platform_device_unregister(dcdbas_pdev).

This patch moves platform_device_unregister(dcdbas_pdev) after
smi_data_buf_free() in dcdbas_exit().
Signed-off-by: NDoug Warzecha <Douglas_Warzecha@dell.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 85a6cd03
......@@ -39,7 +39,7 @@
#include "dcdbas.h"
#define DRIVER_NAME "dcdbas"
#define DRIVER_VERSION "5.6.0-1"
#define DRIVER_VERSION "5.6.0-2"
#define DRIVER_DESCRIPTION "Dell Systems Management Base Driver"
static struct platform_device *dcdbas_pdev;
......@@ -581,9 +581,13 @@ static int __init dcdbas_init(void)
*/
static void __exit dcdbas_exit(void)
{
platform_device_unregister(dcdbas_pdev);
/*
* make sure functions that use dcdbas_pdev are called
* before platform_device_unregister
*/
unregister_reboot_notifier(&dcdbas_reboot_nb);
smi_data_buf_free();
platform_device_unregister(dcdbas_pdev);
}
module_init(dcdbas_init);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册