From: Adrian Bunk Date: Sat, 11 Mar 2006 15:12:00 +0000 (-0500) Subject: [ACPI] drivers/acpi/video.c: fix error path NULL pointer dereference X-Git-Tag: v2.6.18-rc1~1081^2~19^2~13^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6665bda76461308868bd1e52caf627f4cb29ed32;p=linux-2.6 [ACPI] drivers/acpi/video.c: fix error path NULL pointer dereference The Coverity checker spotted this bug in acpi_video_device_lcd_query_levels(). Signed-off-by: Adrian Bunk Signed-off-by: Len Brown --- diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index bd48875183..724149d72d 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -323,7 +323,7 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device, if (!ACPI_SUCCESS(status)) return_VALUE(status); obj = (union acpi_object *)buffer.pointer; - if (!obj && (obj->type != ACPI_TYPE_PACKAGE)) { + if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _BCL data\n")); status = -EFAULT; goto err;