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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Mar 2021 19:56:00 +0000 (11:56 -0800)
commit143c253f42bad20357e7e4432087aca747c43384
treec5d1b1378faf9c95ea82255007788b057f812e7a
parent4d8c79b7e9ff05030aad68421f7584b129933ba6
net: hisilicon: hns: fix error return code of hns_nic_clear_all_rx_fetch()

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>
drivers/net/ethernet/hisilicon/hns/hns_enet.c