summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/arm_sdei.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-01-15 11:41:53 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2018-01-15 19:16:59 +0100
commit2f7aacf795e0192648b51674aef90e755e02408c (patch)
treea60e4aedc5329ddb4e40a7b80fb512c59d88a84a /drivers/firmware/arm_sdei.c
parentperf: dsu: Use signed field for dsu_pmu->num_counters (diff)
downloadlinux-2f7aacf795e0192648b51674aef90e755e02408c.tar.xz
linux-2f7aacf795e0192648b51674aef90e755e02408c.zip
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: 677a60bd2003 ("firmware: arm_sdei: Discover SDEI support via ACPI") Acked-by: James Morse <james.morse@arm.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'drivers/firmware/arm_sdei.c')
-rw-r--r--drivers/firmware/arm_sdei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
index 8f6563c595e5..1ea71640fdc2 100644
--- a/drivers/firmware/arm_sdei.c
+++ b/drivers/firmware/arm_sdei.c
@@ -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;