diff options
author | Thomas Renninger <trenn@suse.de> | 2005-11-08 05:27:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-11-30 23:03:08 -0500 |
commit | 59d399d357a7705568f424c6e861ee8657f7f655 (patch) | |
tree | 642af97ec5c14243744a76c2744b785d259f3594 /drivers/acpi/video.c | |
parent | d2149b542382bfc206cb28485108f6470c979566 (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>
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)) |