aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:05 -0500
commit6044ec8882c726e325017bd948aa0cd94ad33abc (patch)
tree3bfc5dc93434e8ad556540f6689abcd2699aa45d /drivers/acpi/scan.c
parent2ea7533060e361810c21b2f5ee02151c4dfb85d8 (diff)
[PATCH] kfree cleanup: misc remaining drivers
This is the remaining misc drivers/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in misc files in drivers/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> Acked-by: Roland Dreier <rolandd@cisco.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Acked-by: Jean Delvare <khali@linux-fr.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Len Brown <len.brown@intel.com> Acked-by: "Antonino A. Daplas" <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index c6db591479de..23e2c6968a11 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -28,8 +28,7 @@ static int acpi_bus_trim(struct acpi_device *start, int rmdevice);
28static void acpi_device_release(struct kobject *kobj) 28static void acpi_device_release(struct kobject *kobj)
29{ 29{
30 struct acpi_device *dev = container_of(kobj, struct acpi_device, kobj); 30 struct acpi_device *dev = container_of(kobj, struct acpi_device, kobj);
31 if (dev->pnp.cid_list) 31 kfree(dev->pnp.cid_list);
32 kfree(dev->pnp.cid_list);
33 kfree(dev); 32 kfree(dev);
34} 33}
35 34
@@ -1117,8 +1116,7 @@ acpi_add_single_object(struct acpi_device **child,
1117 if (!result) 1116 if (!result)
1118 *child = device; 1117 *child = device;
1119 else { 1118 else {
1120 if (device->pnp.cid_list) 1119 kfree(device->pnp.cid_list);
1121 kfree(device->pnp.cid_list);
1122 kfree(device); 1120 kfree(device);
1123 } 1121 }
1124 1122