]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/video.c
[ACPI] Fix Null pointer deref in video/lcd/brightness
[linux-2.6-omap-h63xx.git] / drivers / acpi / video.c
index f051b151580d7de14647213f6c4497a75a4eff57..d10668f146997d07c53630b722d15fad2054ed98 100644 (file)
@@ -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))