mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-12 16:19:53 +00:00
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 <weiyongjun1@huawei.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
fcfd143698
commit
1646337b86
@ -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) *
|
||||
|
Loading…
x
Reference in New Issue
Block a user