Skip to content

Commit

Permalink
[ACPI] Fix Null pointer deref in video/lcd/brightness
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Renninger authored and Len Brown committed Dec 1, 2005
1 parent d2149b5 commit 59d399d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 59d399d

Please sign in to comment.