diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c index f49246dfa40c46e4412949a7c887be9474a7c9e2..c0ce37b1702cdb1388889df4f0cba259d0832124 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c @@ -768,10 +768,10 @@ static int hns_nic_rx_poll_one(struct hns_nic_ring_data *ring_data, clean_count = 0; } - /* poll one pkg*/ + /* poll one pkt*/ err = hns_nic_poll_rx_skb(ring_data, &skb, &bnum); if (unlikely(!skb)) /* this fault cannot be repaired */ - break; + goto out; recv_bds += bnum; clean_count += bnum; @@ -797,6 +797,7 @@ static int hns_nic_rx_poll_one(struct hns_nic_ring_data *ring_data, } } +out: /* make all data has been write before submit */ if (clean_count > 0) hns_nic_alloc_rx_buffers(ring_data, clean_count);