]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: mdio: ipq8064: replace ioremap() with devm_ioremap()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 26 Nov 2021 09:13:40 +0000 (17:13 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Nov 2021 12:02:49 +0000 (12:02 +0000)
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>
drivers/net/mdio/mdio-ipq8064.c

index bd1aea2d5a264fb5b9ab472d5b699a94fa471b01..37e0d8b6da078a371613d437e6fcaf13516cce58 100644 (file)
@@ -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;