Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Axel Lin and committed by
Greg Kroah-Hartman
e3ed249a 5b232f75

+2 -3
+2 -3
drivers/firmware/dcdbas.c
··· 634 634 * before platform_device_unregister 635 635 */ 636 636 unregister_reboot_notifier(&dcdbas_reboot_nb); 637 - smi_data_buf_free(); 638 - platform_device_unregister(dcdbas_pdev); 639 - platform_driver_unregister(&dcdbas_driver); 640 637 641 638 /* 642 639 * We have to free the buffer here instead of dcdbas_remove ··· 642 645 * released. 643 646 */ 644 647 smi_data_buf_free(); 648 + platform_device_unregister(dcdbas_pdev); 649 + platform_driver_unregister(&dcdbas_driver); 645 650 } 646 651 647 652 module_init(dcdbas_init);