Explorar el Código

Pull 5571 into release branch

Len Brown hace 20 años
padre
commit
b7639dafb4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      drivers/acpi/video.c

+ 1 - 1
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))