]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
clk: meson-axg: fix return value check in axg_clkc_probe()
authorweiyongjun (A) <weiyongjun1@huawei.com>
Thu, 28 Dec 2017 02:40:49 +0000 (02:40 +0000)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 28 Dec 2017 18:42:05 +0000 (10:42 -0800)
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>
drivers/clk/meson/axg.c

index a66b3a5e7ec058c52178db02030ae69aaa530f77..717c02d7fe6d2476c4a01ff654e45076c27b663a 100644 (file)
@@ -880,7 +880,7 @@ static int axg_clkc_probe(struct platform_device *pdev)
        /*  Generic clocks and PLLs */
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        clk_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
-       if (IS_ERR(clk_base)) {
+       if (!clk_base) {
                dev_err(&pdev->dev, "Unable to map clk base\n");
                return -ENXIO;
        }