]> git.baikalelectronics.ru Git - kernel.git/commit
net: davinci_emac: Use devm_platform_get_and_ioremap_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 9 Jun 2021 14:17:44 +0000 (22:17 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jun 2021 20:02:01 +0000 (13:02 -0700)
commita2109e660a8df7e076f0bd388aa269cc1dd25148
tree330f6cd7aba6008262dc9003bc505357d0e03ad0
parent60fcc95cfef70f1088ba6b780c5a51c6a2e3f354
net: davinci_emac: 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/ethernet/ti/davinci_emac.c