diff options
author | Len Brown <len.brown@intel.com> | 2005-12-06 17:31:30 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-12-06 17:31:30 -0500 |
commit | 3d5271f9883cba7b54762bc4fe027d4172f06db7 (patch) | |
tree | ab8a881a14478598a0c8bda0d26c62cdccfffd6d /drivers/acpi/video.c | |
parent | 378b2556f4e09fa6f87ff0cb5c4395ff28257d02 (diff) | |
parent | 9115a6c787596e687df03010d97fccc5e0762506 (diff) |
Pull release into acpica branch
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index e383d6109ae1..d10668f14699 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 | } |
@@ -813,7 +812,7 @@ acpi_video_device_write_brightness(struct file *file, | |||
813 | 812 | ||
814 | ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); | 813 | ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); |
815 | 814 | ||
816 | if (!dev || count + 1 > sizeof str) | 815 | if (!dev || !dev->brightness || count + 1 > sizeof str) |
817 | return_VALUE(-EINVAL); | 816 | return_VALUE(-EINVAL); |
818 | 817 | ||
819 | if (copy_from_user(str, buffer, count)) | 818 | if (copy_from_user(str, buffer, count)) |
@@ -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); |