Commit 6665bda7 authored by Adrian Bunk's avatar Adrian Bunk Committed by Len Brown

[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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent fdc136cc
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment