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)
commit3469660d1b15ccfdf7b33295c306b6298ca730aa
tree965116c1da5b2d6c02070e8e4211b1e436cb61ab
parentd28ea1fbbf437054ef339afec241019f2c4e2bb6
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: 4b41d3436796 ("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