]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: am65-cpsw-nuss: fix error handling of am65_cpsw_nuss_probe
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 20 May 2020 03:41:16 +0000 (11:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 May 2020 00:14:18 +0000 (17:14 -0700)
commit2303f6137f53d55373dc23d8891e3904a4e0714d
tree341f692f29bf8bc3c19ab133fd3a09951d259653
parent7c603e60e1c80e08920538c037e3f09a7bf180c8
net: ethernet: ti: am65-cpsw-nuss: fix error handling of am65_cpsw_nuss_probe

Convert to using IS_ERR() instead of NULL test for cpsw_ale_create()
error handling. Also fix to return negative error code from this error
handling case instead of 0 in.

Fixes: ddd326a112f7 ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
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/ti/am65-cpsw-nuss.c