[PATCH 15/28] dcdbas: remove a redundant smi_data_buf_free in dcdbas_exit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg Kroah-Hartman
Date: Thursday, August 5, 2010 - 3:24 pm

From: Axel Lin <axel.lin@gmail.com>

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 |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index aa9bc9e..69ad529 100644
--- a/drivers/firmware/dcdbas.c
+++ b/drivers/firmware/dcdbas.c
@@ -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);
-- 
1.7.2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PATCH] driver core patches for .36, Greg KH, (Thu Aug 5, 2:33 pm)
[PATCH 01/28] uio: Remove IRQF_DISABLED flag from uio_pdrv ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 02/28] uio: Remove IRQF_DISABLED from uio_sercos3.c, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 03/28] uio: Remove IRQF_DISABLED flag from uio_cif.c, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 04/28] hotplug: Support kernel/hotplug sysctl varia ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 05/28] Driver core: internal struct dma_coherent_me ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 06/28] Driver core: Drop __must_check from bus_for_ ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 07/28] firmware loader: use statically initialized ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 08/28] firmware loader: embed device into firmware_ ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 09/28] Driver core: use kmemdup in platform_device_ ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 10/28] Driver core: reduce duplicated code for plat ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 11/28] Driver core: move platform device creation h ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 12/28] firmware: Update hotplug script, Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 13/28] sysfs: sysfs_chmod_file's attr can be const, Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 14/28] dmi-id: fix a memory leak in dmi_id_init err ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 15/28] dcdbas: remove a redundant smi_data_buf_free ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 16/28] sysfs: fix discrepancies between implementat ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 17/28] sysfs: Fix one more signature discrepancy be ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 18/28] debugfs: no longer needs to depend on SYSFS, Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 19/28] driver core: fix memory leak on one error pa ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 20/28] Driver core: Add BUS_NOTIFY_BIND_DRIVER, Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 21/28] cgroupfs: create /sys/fs/cgroup to mount cgr ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 22/28] scsi: Remove owner field from attribute init ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 23/28] scsi: Remove owner field from attribute init ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 24/28] leds: Remove owner field from attribute init ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 25/28] regulator: Remove owner field from attribute ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 26/28] powerpc/pci: Remove owner field from attribu ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 27/28] sysfs: Remove owner field from sysfs struct ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)
[PATCH 28/28] driver core: device_rename's new_name can be ..., Greg Kroah-Hartman, (Thu Aug 5, 3:24 pm)