* [PATCH -next] clk: meson-axg: fix return value check in axg_clkc_probe()
@ 2017-12-28 2:40 Wei Yongjun
2017-12-28 18:42 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2017-12-28 2:40 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
drivers/clk/meson/axg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c
index a66b3a5..717c02d 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)
/* 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-28 18:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-28 2:40 [PATCH -next] clk: meson-axg: fix return value check in axg_clkc_probe() Wei Yongjun
2017-12-28 18:42 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).