Skip to content

Commit

Permalink
Pull 5571 into release branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Len Brown committed Dec 1, 2005
2 parents c8734a9 + 59d399d commit b7639da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit b7639da

Please sign in to comment.