提交 4f8f7809 编写于 作者: W weiyongjun (A) 提交者: Stephen Boyd

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: 78b4af31 ("clk: meson-axg: add clock controller drivers")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
上级 70d7aebe
...@@ -880,7 +880,7 @@ static int axg_clkc_probe(struct platform_device *pdev) ...@@ -880,7 +880,7 @@ static int axg_clkc_probe(struct platform_device *pdev)
/* Generic clocks and PLLs */ /* Generic clocks and PLLs */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
clk_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); 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"); dev_err(&pdev->dev, "Unable to map clk base\n");
return -ENXIO; return -ENXIO;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册