mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-15 19:25:13 +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: fcfd143698 ("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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue