aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorweiyongjun (A) <weiyongjun1@huawei.com>2017-12-27 21:40:49 -0500
committerStephen Boyd <sboyd@codeaurora.org>2017-12-28 13:42:05 -0500
commit4f8f7809e47b6af17032aad66f84d7c16444bd05 (patch)
treebe0c3486a084989675a7f6eb902e350f92890259
parent70d7aebe63985808b604c20a17875a7f07f16900 (diff)
clk: meson-axg: fix return value check in axg_clkc_probe()
In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 78b4af312f91 ("clk: meson-axg: add clock controller drivers") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--drivers/clk/meson/axg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c
index a66b3a5e7ec0..717c02d7fe6d 100644
--- a/drivers/clk/meson/axg.c
+++ b/drivers/clk/meson/axg.c
@@ -880,7 +880,7 @@ static int axg_clkc_probe(struct platform_device *pdev)
880 /* Generic clocks and PLLs */ 880 /* Generic clocks and PLLs */
881 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 881 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
882 clk_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); 882 clk_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
883 if (IS_ERR(clk_base)) { 883 if (!clk_base) {
884 dev_err(&pdev->dev, "Unable to map clk base\n"); 884 dev_err(&pdev->dev, "Unable to map clk base\n");
885 return -ENXIO; 885 return -ENXIO;
886 } 886 }