Commit 2f7ed29f authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

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

Use devm_ioremap() instead of ioremap() to avoid iounmap() missing.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d40ce48c
...@@ -127,7 +127,7 @@ ipq8064_mdio_probe(struct platform_device *pdev) ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment