提交 6665bda7 编写于 作者: A Adrian Bunk 提交者: 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: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册