net: mdio: ipq8064: replace ioremap() with devm_ioremap()

Use devm_ioremap() instead of ioremap() to avoid iounmap() missing.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Yang Yingliang 2021-11-26 17:13:40 +08:00 committed by David S. Miller
parent d40ce48cb3
commit 2f7ed29f2c

View File

@ -127,7 +127,7 @@ ipq8064_mdio_probe(struct platform_device *pdev)
if (of_address_to_resource(np, 0, &res)) if (of_address_to_resource(np, 0, &res))
return -ENOMEM; return -ENOMEM;
base = ioremap(res.start, resource_size(&res)); base = devm_ioremap(&pdev->dev, res.start, resource_size(&res));
if (!base) if (!base)
return -ENOMEM; return -ENOMEM;