diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-01-05 02:41:01 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2018-01-27 01:22:48 +0100 |
commit | accf475a5ece972af58c81e0742035ed90ad41d2 (patch) | |
tree | bda97d685702c283211fd7d7113df427811eacfe /drivers/clk/clk-aspeed.c | |
parent | clk: aspeed: Add reset controller (diff) | |
download | linux-accf475a5ece972af58c81e0742035ed90ad41d2.tar.xz linux-accf475a5ece972af58c81e0742035ed90ad41d2.zip |
clk: aspeed: Fix return value check in aspeed_cc_init()
In case of error, the function of_iomap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Fixes: a2e230c7b2ea ("clk: Add clock driver for ASPEED BMC SoCs")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk-aspeed.c')
-rw-r--r-- | drivers/clk/clk-aspeed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c index 6fb344730cea..f9b9688cbd1f 100644 --- a/drivers/clk/clk-aspeed.c +++ b/drivers/clk/clk-aspeed.c @@ -609,7 +609,7 @@ static void __init aspeed_cc_init(struct device_node *np) int i; scu_base = of_iomap(np, 0); - if (IS_ERR(scu_base)) + if (!scu_base) return; aspeed_clk_data = kzalloc(sizeof(*aspeed_clk_data) + |