Commit e3ed249a authored by Axel Lin's avatar Axel Lin Committed by Greg Kroah-Hartman

dcdbas: remove a redundant smi_data_buf_free in dcdbas_exit

smi_data_buf_free is called twice in current implementation.
The second call simply return because smi_data_buf is set to NULL in first call.
This patch removes the second smi_data_buf_free call.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5b232f75
...@@ -634,9 +634,6 @@ static void __exit dcdbas_exit(void) ...@@ -634,9 +634,6 @@ static void __exit dcdbas_exit(void)
* before platform_device_unregister * before platform_device_unregister
*/ */
unregister_reboot_notifier(&dcdbas_reboot_nb); unregister_reboot_notifier(&dcdbas_reboot_nb);
smi_data_buf_free();
platform_device_unregister(dcdbas_pdev);
platform_driver_unregister(&dcdbas_driver);
/* /*
* We have to free the buffer here instead of dcdbas_remove * We have to free the buffer here instead of dcdbas_remove
...@@ -645,6 +642,8 @@ static void __exit dcdbas_exit(void) ...@@ -645,6 +642,8 @@ static void __exit dcdbas_exit(void)
* released. * released.
*/ */
smi_data_buf_free(); smi_data_buf_free();
platform_device_unregister(dcdbas_pdev);
platform_driver_unregister(&dcdbas_driver);
} }
module_init(dcdbas_init); module_init(dcdbas_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment