clocksource/drivers/ingenic_ost: Fix return value check in ingenic_ost_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 8 Mar 2021 12:30:31 +0000 (12:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:16 +0000 (09:50 +0200)
commit1de36911689c192aa1c20682102ceb956b5372c0
treeb42aa78f30342e663ab0435a107344c030c24a04
parentedfcc1835958392c0eaad85e6c0cb0b302fe3695
clocksource/drivers/ingenic_ost: Fix return value check in ingenic_ost_probe()

[ Upstream commit 2a65f7e2772613debd03fa2492e76a635aa04545 ]

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

Fixes: ca7b72b5a5f2 ("clocksource: Add driver for the Ingenic JZ47xx OST")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210308123031.2285083-1-weiyongjun1@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clocksource/ingenic-ost.c