net: hisilicon: hns: fix error return code of hns_nic_clear_all_rx_fetch()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Sun, 7 Mar 2021 08:40:12 +0000 (00:40 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:31:49 +0000 (14:31 +0200)
commit184dc037575ca7d47edd5f37d6ada6dc11e8dad9
tree452fa47c0938a609e9bf385ee22e1dd5b3cbb02f
parent9d1a5392aca1943bfea6f424346764db75018431
net: hisilicon: hns: fix error return code of hns_nic_clear_all_rx_fetch()

[ Upstream commit 143c253f42bad20357e7e4432087aca747c43384 ]

When hns_assemble_skb() returns NULL to skb, no error return code of
hns_nic_clear_all_rx_fetch() is assigned.
To fix this bug, ret is assigned with -ENOMEM in this case.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns/hns_enet.c