1
0
Fork 0

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: fcfd143698 ("clk: npcm7xx: add clock controller")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
hifive-unleashed-5.1
Wei Yongjun 2018-04-26 11:21:08 +00:00 committed by Stephen Boyd
parent fcfd143698
commit 1646337b86
1 changed files with 1 additions and 1 deletions

View File

@ -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) *