diff options
-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 f051b151580..d10668f1469 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)) |