aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2005-11-08 05:27:00 -0500
committerLen Brown <len.brown@intel.com>2005-11-30 23:03:08 -0500
commit59d399d357a7705568f424c6e861ee8657f7f655 (patch)
tree642af97ec5c14243744a76c2744b785d259f3594
parentd2149b542382bfc206cb28485108f6470c979566 (diff)
[ACPI] Fix Null pointer deref in video/lcd/brightness
http://bugzilla.kernel.org/show_bug.cgi?id=5571 Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Yu Luming <luming.yu@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index f051b151580d..d10668f14699 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -812,7 +812,7 @@ acpi_video_device_write_brightness(struct file *file,
812 812
813 ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); 813 ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness");
814 814
815 if (!dev || count + 1 > sizeof str) 815 if (!dev || !dev->brightness || count + 1 > sizeof str)
816 return_VALUE(-EINVAL); 816 return_VALUE(-EINVAL);
817 817
818 if (copy_from_user(str, buffer, count)) 818 if (copy_from_user(str, buffer, count))