diff options
Diffstat (limited to 'drivers/net/sfc/rx.c')
-rw-r--r-- | drivers/net/sfc/rx.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c index fa1a62aacbae..7d2dc20d0ca3 100644 --- a/drivers/net/sfc/rx.c +++ b/drivers/net/sfc/rx.c | |||
@@ -789,23 +789,14 @@ int efx_probe_rx_queue(struct efx_rx_queue *rx_queue) | |||
789 | /* Allocate RX buffers */ | 789 | /* Allocate RX buffers */ |
790 | rxq_size = (efx->type->rxd_ring_mask + 1) * sizeof(*rx_queue->buffer); | 790 | rxq_size = (efx->type->rxd_ring_mask + 1) * sizeof(*rx_queue->buffer); |
791 | rx_queue->buffer = kzalloc(rxq_size, GFP_KERNEL); | 791 | rx_queue->buffer = kzalloc(rxq_size, GFP_KERNEL); |
792 | if (!rx_queue->buffer) { | 792 | if (!rx_queue->buffer) |
793 | rc = -ENOMEM; | 793 | return -ENOMEM; |
794 | goto fail1; | ||
795 | } | ||
796 | 794 | ||
797 | rc = falcon_probe_rx(rx_queue); | 795 | rc = falcon_probe_rx(rx_queue); |
798 | if (rc) | 796 | if (rc) { |
799 | goto fail2; | 797 | kfree(rx_queue->buffer); |
800 | 798 | rx_queue->buffer = NULL; | |
801 | return 0; | 799 | } |
802 | |||
803 | fail2: | ||
804 | kfree(rx_queue->buffer); | ||
805 | rx_queue->buffer = NULL; | ||
806 | fail1: | ||
807 | rx_queue->used = 0; | ||
808 | |||
809 | return rc; | 800 | return rc; |
810 | } | 801 | } |
811 | 802 | ||
@@ -872,7 +863,6 @@ void efx_remove_rx_queue(struct efx_rx_queue *rx_queue) | |||
872 | 863 | ||
873 | kfree(rx_queue->buffer); | 864 | kfree(rx_queue->buffer); |
874 | rx_queue->buffer = NULL; | 865 | rx_queue->buffer = NULL; |
875 | rx_queue->used = 0; | ||
876 | } | 866 | } |
877 | 867 | ||
878 | void efx_flush_lro(struct efx_channel *channel) | 868 | void efx_flush_lro(struct efx_channel *channel) |