OSDN Git Service

net: mido: mdio-mux-bcm-iproc: Use devm_platform_get_and_ioremap_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 10 Jun 2021 09:17:12 +0000 (17:17 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jun 2021 20:59:37 +0000 (13:59 -0700)
commit8a55a73433e763c8aec4a3e8df5c28c821fc44b9
tree7818282f94d7b14578f2bae45e3c5beeb6dc6a87
parent1f7096f0fdb2ac5ae6f1e290dfdd2fb7bbb074d3
net: mido: mdio-mux-bcm-iproc: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code and avoid a null-ptr-deref by checking 'res' in it.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mdio/mdio-mux-bcm-iproc.c