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: firefly_0821_release~35458^2~19^2~13^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6665bda76461308868bd1e52caf627f4cb29ed32;p=firefly-linux-kernel-4.4.55.git [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 bd4887518373..724149d72d91 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;