mfd: pm8008: Fix return value check in pm8008_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 25 Nov 2022 07:36:26 +0000 (15:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:52 +0000 (13:32 +0100)
commit7f47c91e465ae1aa56b92e090c163d32838f67ad
treefba65284be5aece4c1b61368e9eb74c885502605
parentb8d07df9ede9159b332959598159aa7dd7d5b27a
mfd: pm8008: Fix return value check in pm8008_probe()

[ Upstream commit 14f8c55d48e02157519fbcb3a5de557abd8a06e2 ]

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

Fixes: 6b149f3310a4 ("mfd: pm8008: Add driver for QCOM PM8008 PMIC")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Guru Das Srinagesh <gurus@codeaurora.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221125073626.1868229-1-yangyingliang@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/qcom-pm8008.c