mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 05:11:32 +00:00
[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>
This commit is contained in:
parent
d2149b5423
commit
59d399d357
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user