]> git.baikalelectronics.ru Git - kernel.git/commit
net: moxa: Use devm_platform_get_and_ioremap_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 7 Jun 2021 15:02:59 +0000 (23:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2021 21:08:30 +0000 (14:08 -0700)
commit987a0a6c6bd9ad57b860dedbf9373fcba2f72a56
treecb81223c3fcba6757d508cca7b8b588c5c99d00c
parent9c72181df4042cd0b76aa7afbc955992e705b010
net: moxa: 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/moxa/moxart_ether.c