mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 04:41:26 +00:00
[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 <bunk@stusta.de> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
fdc136ccd3
commit
6665bda764
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user