提交 2f7aacf7 编写于 作者: W Wei Yongjun 提交者: Catalin Marinas

firmware: arm_sdei: Fix return value check in sdei_present_dt()

In case of error, the function of_platform_device_create() returns
NULL pointer not ERR_PTR(). The IS_ERR() test in the return value
check should be replaced with NULL test.

Fixes: 677a60bd ("firmware: arm_sdei: Discover SDEI support via ACPI")
Acked-by: NJames Morse <james.morse@arm.com>
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
上级 a22fde8e
......@@ -1023,7 +1023,7 @@ static bool __init sdei_present_dt(void)
pdev = of_platform_device_create(np, sdei_driver.driver.name, NULL);
of_node_put(np);
if (IS_ERR(pdev))
if (!pdev)
return false;
return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册