]> git.baikalelectronics.ru Git - kernel.git/commit
net: korina: Fix return value check in korina_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 13 May 2021 12:46:21 +0000 (12:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 May 2021 22:54:08 +0000 (15:54 -0700)
commit8b8962cb8d2f00cc72e4ae47bdeb553e695982d5
tree42beec029b28d0cc6c73798d472f98aaef9714c8
parentc374816204b6cbeddd3b99b5b2b40f0b5601679c
net: korina: Fix return value check in korina_probe()

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

Fixes: 200703e3727e ("net: korina: Use devres functions")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/korina.c