diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-04-26 07:21:08 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2018-05-01 17:50:29 -0400 |
commit | 1646337b866753681148db3a8878c4a062b484c5 (patch) | |
tree | 2ffb7436e0d1862d44f66bb132c927cbe70405d0 | |
parent | fcfd14369856af8ae34cd5b556e480cb1e39ed1a (diff) |
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>
-rw-r--r-- | drivers/clk/clk-npcm7xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
555 | } | 555 | } |
556 | 556 | ||
557 | clk_base = ioremap(res.start, resource_size(&res)); | 557 | clk_base = ioremap(res.start, resource_size(&res)); |
558 | if (IS_ERR(clk_base)) | 558 | if (!clk_base) |
559 | goto npcm7xx_init_error; | 559 | goto npcm7xx_init_error; |
560 | 560 | ||
561 | npcm7xx_clk_data = kzalloc(sizeof(*npcm7xx_clk_data->hws) * | 561 | npcm7xx_clk_data = kzalloc(sizeof(*npcm7xx_clk_data->hws) * |