From 1646337b866753681148db3a8878c4a062b484c5 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Thu, 26 Apr 2018 11:21:08 +0000 Subject: 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. Fixes: fcfd14369856 ("clk: npcm7xx: add clock controller") Signed-off-by: Wei Yongjun Signed-off-by: Stephen Boyd --- drivers/clk/clk-npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/clk/clk-npcm7xx.c') diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c index dba5384f03a4..740af90a9508 100644 --- a/drivers/clk/clk-npcm7xx.c +++ b/drivers/clk/clk-npcm7xx.c @@ -555,7 +555,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; npcm7xx_clk_data = kzalloc(sizeof(*npcm7xx_clk_data->hws) * -- cgit