clk: sp7021: fix return value check in sp7021_clk_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 28 Nov 2023 13:30:16 +0000 (21:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:37 +0000 (15:35 -0800)
commitf35668e633e98e7fe6de7be49d0bda32b0824a7a
tree66b28cf70f99c2a8e66b8fbdbb05f2be7ddecb87
parent2aea9c0498ca5939d2156180969d6b5e0abb0634
clk: sp7021: fix return value check in sp7021_clk_probe()

[ Upstream commit 1004c346a2b7393fce37dd1f320555e0a0d71e3f ]

devm_platform_ioremap_resource() never returns NULL pointer,
it will return ERR_PTR() when it fails, so replace the check
with IS_ERR().

Fixes: d54c1fd4a51e ("clk: Add Sunplus SP7021 clock driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20231128133016.2494699-1-yangyingliang@huawei.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk-sp7021.c