OSDN Git Service

net: lantiq: Fix return value check in xrx200_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 15 Sep 2018 01:33:50 +0000 (01:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Sep 2018 15:06:41 +0000 (08:06 -0700)
commitb8b2de91e9dbb89bf4c34a860b04e53a1b1416bf
tree1d243cd1f8bdfda9887afd58adbca6e1584cc5e1
parentf592e0b9895cd6f04ba2771a3903317dd7c1ba31
net: lantiq: Fix return value check in xrx200_probe()

In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/lantiq_xrx200.c