Commit 3aa1417
net: spacemit: Fix error handling in emac_alloc_rx_desc_buffers()
Even if we get a dma_mapping_error() while mapping an RX buffer, we
should still update rx_ring->head to ensure that the buffers we were
able to allocate and map are used. Fix this by breaking out to the
existing code after the loop, analogous to the existing handling for skb
allocation failure.
Fixes: bfec6d7 ("net: spacemit: Add K1 Ethernet MAC")
Signed-off-by: Vivian Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 4245a79 commit 3aa1417
1 file changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
569 | 571 | | |
570 | 572 | | |
571 | 573 | | |
| |||
590 | 592 | | |
591 | 593 | | |
592 | 594 | | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | 595 | | |
598 | 596 | | |
599 | 597 | | |
| |||
0 commit comments