summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2005-11-08 11:27:00 +0100
committerLen Brown <len.brown@intel.com>2005-12-01 05:03:08 +0100
commit59d399d357a7705568f424c6e861ee8657f7f655 (patch)
tree642af97ec5c14243744a76c2744b785d259f3594 /drivers/acpi/video.c
parentMerge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git (diff)
downloadlinux-59d399d357a7705568f424c6e861ee8657f7f655.tar.xz
linux-59d399d357a7705568f424c6e861ee8657f7f655.zip
[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>
Diffstat (limited to 'drivers/acpi/video.c')
-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,
ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness");
- if (!dev || count + 1 > sizeof str)
+ if (!dev || !dev->brightness || count + 1 > sizeof str)
return_VALUE(-EINVAL);
if (copy_from_user(str, buffer, count))