dcdbas: remove a redundant smi_data_buf_free in dcdbas_exit
authorAxel Lin <axel.lin@gmail.com>
Mon, 5 Jul 2010 01:35:47 +0000 (09:35 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 5 Aug 2010 20:53:34 +0000 (13:53 -0700)
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: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/firmware/dcdbas.c

index aa9bc9e..69ad529 100644 (file)
@@ -634,9 +634,6 @@ static void __exit dcdbas_exit(void)
         * before platform_device_unregister
         */
        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
@@ -645,6 +642,8 @@ static void __exit dcdbas_exit(void)
         * released.
         */
        smi_data_buf_free();
+       platform_device_unregister(dcdbas_pdev);
+       platform_driver_unregister(&dcdbas_driver);
 }
 
 module_init(dcdbas_init);