Skip to content

Commit

Permalink
dcdbas: remove a redundant smi_data_buf_free in dcdbas_exit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Greg Kroah-Hartman committed Aug 5, 2010
1 parent 5b232f7 commit e3ed249
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/firmware/dcdbas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit e3ed249

Please sign in to comment.