]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcf54d0983dc7cec60b79a031898b4c2923fc2c2a
treec5d1b1378faf9c95ea82255007788b057f812e7a
parentbe50ef849ba002617b81e52e4c42320dd4acd5c3
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