From: Wei Yongjun Date: Thu, 26 Apr 2018 11:21:08 +0000 (+0000) Subject: clk: npcm7xx: fix return value check in npcm7xx_clk_init() X-Git-Tag: v4.18-rc1~79^2~10^3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1646337b866753681148db3a8878c4a062b484c5;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c index dba5384f03a47..740af90a95082 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) *