]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns: fix return value check in hns_dsaf_get_cfg()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 5 Jul 2016 07:56:52 +0000 (07:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2016 17:20:56 +0000 (10:20 -0700)
commit9575da67055f45cfbea19f0f9d12a2364abe6d1d
tree8feaacd4a0bc8be196afec35f85d00f7bac2073d
parent947ec757a2e356c73cc0e9c17c85ad9b36167346
net: hns: fix return value check in hns_dsaf_get_cfg()

In case of error, 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().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c