diff options
author | Thomas Renninger <trenn@suse.de> | 2005-11-08 11:27:00 +0100 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-12-01 05:03:08 +0100 |
commit | 59d399d357a7705568f424c6e861ee8657f7f655 (patch) | |
tree | 642af97ec5c14243744a76c2744b785d259f3594 /drivers/acpi/video.c | |
parent | Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git (diff) | |
download | linux-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.c | 2 |
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)) |