Skip to contentSkip to conversation

Fix Null point in video/lcd/brightness

PATCH New Yu Luming 1 participant 1 message Nov 19, 2005 ACPI

lore
Share & tools
lore

Yu Luming

author
#0 lore raw

PATCH 1/1 Fix Null point in video/lcd/brightness

Fix Null point in video/lcd/brightness
http://bugzilla.kernel.org/show_bug.cgi?id=5571

Signed-off-by Luming Yu
Cc "Brown, Len"
---
 video.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/video.c renamed from drivers/acpi/video.c.orig +1 -1
@@ -813,7 +813,7 @@
 
 	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))

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click