]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Jun 2020 11:16:47 +0000 (13:16 +0200)
commit2d3832450a6bc656f830cddc07e18bf131580d26
tree7568254d9a5e878f9f287adeec75642349284da1
parentdc93a4fb8ff2ae87f56ef816a1c7ca100723249f
net: ethernet: ti: fix some return value check of cpsw_ale_create()

[ Upstream commit 3469660d1b15ccfdf7b33295c306b6298ca730aa ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/ti/cpsw_ale.c
drivers/net/ethernet/ti/cpsw_priv.c
drivers/net/ethernet/ti/netcp_ethss.c