aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r--drivers/acpi/video.c2
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,
812 812
813 ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); 813 ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness");
814 814
815 if (!dev || count + 1 > sizeof str) 815 if (!dev || !dev->brightness || count + 1 > sizeof str)
816 return_VALUE(-EINVAL); 816 return_VALUE(-EINVAL);
817 817
818 if (copy_from_user(str, buffer, count)) 818 if (copy_from_user(str, buffer, count))