]> git.baikalelectronics.ru Git - kernel.git/commit
net: sparx5: fix return value check in sparx5_create_targets()
authorYang Yingliang <yangyingliang@huawei.com>
Sat, 26 Jun 2021 04:44:19 +0000 (12:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jun 2021 21:20:22 +0000 (14:20 -0700)
commit22ade1b851e1ce291266908e181308d3f9e050d3
treeb6df2cda795424945ccf611123117295d226fcec
parent573a82ae5ff2f6c938bc108f2f04db6341450541
net: sparx5: fix return value check in sparx5_create_targets()

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

Fixes: d8258264af1d ("net: sparx5: add the basic sparx5 driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/sparx5/sparx5_main.c