summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-04-26 14:21:08 +0300
committerJoel Stanley <joel@jms.id.au>2018-05-18 11:34:22 +0300
commita4a5f059746b2726c62a3190c5808d070899c62c (patch)
tree3daafeebe124abad7ece287f1d35741ea6fe647c
parent11a7085824a158dde5d35f375c49c96f9ed06443 (diff)
downloadlinux-a4a5f059746b2726c62a3190c5808d070899c62c.tar.xz
clk: npcm7xx: fix return value check in npcm7xx_clk_init()
In case of error, the function ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. OpenBMC-Staging-Count: 1 Fixes: fcfd14369856 ("clk: npcm7xx: add clock controller") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r--drivers/clk/clk-npcm7xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c
index 7e4964b9e5c8..fa6bb1c29c77 100644
--- a/drivers/clk/clk-npcm7xx.c
+++ b/drivers/clk/clk-npcm7xx.c
@@ -583,7 +583,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np)
clk_base = ioremap(res.start, resource_size(&res));
- if (IS_ERR(clk_base))
+ if (!clk_base)
goto npcm7xx_init_error;