From 2f7ed29f2c54ace09eb09e3f97fd573a31b79309 Mon Sep 17 00:00:00 2001 From: Yang Yingliang Date: Fri, 26 Nov 2021 17:13:40 +0800 Subject: [PATCH] net: mdio: ipq8064: replace ioremap() with devm_ioremap() Use devm_ioremap() instead of ioremap() to avoid iounmap() missing. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller --- drivers/net/mdio/mdio-ipq8064.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mdio/mdio-ipq8064.c b/drivers/net/mdio/mdio-ipq8064.c index bd1aea2d5a26..37e0d8b6da07 100644 --- a/drivers/net/mdio/mdio-ipq8064.c +++ b/drivers/net/mdio/mdio-ipq8064.c @@ -127,7 +127,7 @@ ipq8064_mdio_probe(struct platform_device *pdev) if (of_address_to_resource(np, 0, &res)) return -ENOMEM; - base = ioremap(res.start, resource_size(&res)); + base = devm_ioremap(&pdev->dev, res.start, resource_size(&res)); if (!base) return -ENOMEM;