]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: fix some return value check of cpsw_ale_create()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 20 May 2020 03:41:15 +0000 (11:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 May 2020 00:14:18 +0000 (17:14 -0700)
commite442eee2ac1c995dac5c4b061675d70544a44231
tree965116c1da5b2d6c02070e8e4211b1e436cb61ab
parentce3bd85e071fd854c4eba9c0b11262a13f12816c
net: ethernet: ti: fix some return value check of cpsw_ale_create()

cpsw_ale_create() can return both NULL and PTR_ERR(), but all of
the caller only check NULL for error handling. This patch convert
it to only return PTR_ERR() in all error cases, and the caller using
IS_ERR() instead of NULL test.

Fixes: c2ed31849c9e ("net: ethernet: ti: cpsw: allow untagged traffic on host port")
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/cpsw_ale.c
drivers/net/ethernet/ti/cpsw_priv.c
drivers/net/ethernet/ti/netcp_ethss.c