diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-12-03 20:34:14 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-03 20:34:14 -0500 |
commit | 4ef679e6caf1261b6380a610a705a90d7e2738c6 (patch) | |
tree | 6b59360c267508647ae4492f171668ef6ce82e32 /drivers/acpi/video.c | |
parent | 98ac62defe529d04a192688f40d801a2d8fbcf98 (diff) | |
parent | 9a40525788a1b692ee0fc780a8cdb2ac808de1b0 (diff) | |
download | lwn-4ef679e6caf1261b6380a610a705a90d7e2738c6.tar.gz lwn-4ef679e6caf1261b6380a610a705a90d7e2738c6.zip |
Merge branch 'upstream-fixes'
Diffstat (limited to 'drivers/acpi/video.c')
-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 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, 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)) |