diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/container.c | 6 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 6 | ||||
-rw-r--r-- | drivers/acpi/video.c | 12 |
3 files changed, 8 insertions, 16 deletions
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 10dd695a1dd9..27ec12c1fab0 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -118,11 +118,9 @@ static int acpi_container_remove(struct acpi_device *device, int type) | |||
118 | { | 118 | { |
119 | acpi_status status = AE_OK; | 119 | acpi_status status = AE_OK; |
120 | struct acpi_container *pc = NULL; | 120 | struct acpi_container *pc = NULL; |
121 | pc = (struct acpi_container *)acpi_driver_data(device); | ||
122 | |||
123 | if (pc) | ||
124 | kfree(pc); | ||
125 | 121 | ||
122 | pc = (struct acpi_container *)acpi_driver_data(device); | ||
123 | kfree(pc); | ||
126 | return status; | 124 | return status; |
127 | } | 125 | } |
128 | 126 | ||
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); | |||
28 | static void acpi_device_release(struct kobject *kobj) | 28 | static 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 | ||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index e383d6109ae1..f051b151580d 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -334,8 +334,7 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device, | |||
334 | return_VALUE(0); | 334 | return_VALUE(0); |
335 | 335 | ||
336 | err: | 336 | err: |
337 | if (buffer.pointer) | 337 | kfree(buffer.pointer); |
338 | kfree(buffer.pointer); | ||
339 | 338 | ||
340 | return_VALUE(status); | 339 | return_VALUE(status); |
341 | } | 340 | } |
@@ -1488,8 +1487,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) | |||
1488 | } | 1487 | } |
1489 | active_device_list[count].value.int_val = ACPI_VIDEO_HEAD_END; | 1488 | active_device_list[count].value.int_val = ACPI_VIDEO_HEAD_END; |
1490 | 1489 | ||
1491 | if (video->attached_array) | 1490 | kfree(video->attached_array); |
1492 | kfree(video->attached_array); | ||
1493 | 1491 | ||
1494 | video->attached_array = active_device_list; | 1492 | video->attached_array = active_device_list; |
1495 | video->attached_count = count; | 1493 | video->attached_count = count; |
@@ -1645,8 +1643,7 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video) | |||
1645 | printk(KERN_WARNING PREFIX | 1643 | printk(KERN_WARNING PREFIX |
1646 | "hhuuhhuu bug in acpi video driver.\n"); | 1644 | "hhuuhhuu bug in acpi video driver.\n"); |
1647 | 1645 | ||
1648 | if (data->brightness) | 1646 | kfree(data->brightness); |
1649 | kfree(data->brightness); | ||
1650 | 1647 | ||
1651 | kfree(data); | 1648 | kfree(data); |
1652 | } | 1649 | } |
@@ -1831,8 +1828,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type) | |||
1831 | acpi_video_bus_put_devices(video); | 1828 | acpi_video_bus_put_devices(video); |
1832 | acpi_video_bus_remove_fs(device); | 1829 | acpi_video_bus_remove_fs(device); |
1833 | 1830 | ||
1834 | if (video->attached_array) | 1831 | kfree(video->attached_array); |
1835 | kfree(video->attached_array); | ||
1836 | kfree(video); | 1832 | kfree(video); |
1837 | 1833 | ||
1838 | return_VALUE(0); | 1834 | return_VALUE(0); |