From 59d399d357a7705568f424c6e861ee8657f7f655 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 8 Nov 2005 05:27:00 -0500 Subject: [ACPI] Fix Null pointer deref in video/lcd/brightness http://bugzilla.kernel.org/show_bug.cgi?id=5571 Signed-off-by: Thomas Renninger Signed-off-by: Nishanth Aravamudan Signed-off-by: Yu Luming Cc: Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- drivers/acpi/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/acpi') 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)) -- cgit v1.2.3