Skip to content

Commit

Permalink
[ACPI] drivers/acpi/video.c: fix error path NULL pointer dereference
Browse files Browse the repository at this point in the history
The Coverity checker spotted this bug in
acpi_video_device_lcd_query_levels().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Adrian Bunk authored and Len Brown committed Mar 31, 2006
1 parent fdc136c commit 6665bda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6665bda

Please sign in to comment.