]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/sfc/rx.c
sfc: Remove some unreachable error paths
[mirror_ubuntu-artful-kernel.git] / drivers / net / sfc / rx.c
index fa1a62aacbaee5c88a0c23e4ad0fa0902de24562..0f805da4ce55e9c09abd9f6102eb741dbe7f71be 100644 (file)
@@ -789,27 +789,18 @@ int efx_probe_rx_queue(struct efx_rx_queue *rx_queue)
        /* Allocate RX buffers */
        rxq_size = (efx->type->rxd_ring_mask + 1) * sizeof(*rx_queue->buffer);
        rx_queue->buffer = kzalloc(rxq_size, GFP_KERNEL);
-       if (!rx_queue->buffer) {
-               rc = -ENOMEM;
-               goto fail1;
-       }
+       if (!rx_queue->buffer)
+               return -ENOMEM;
 
        rc = falcon_probe_rx(rx_queue);
-       if (rc)
-               goto fail2;
-
-       return 0;
-
- fail2:
-       kfree(rx_queue->buffer);
-       rx_queue->buffer = NULL;
- fail1:
-       rx_queue->used = 0;
-
+       if (rc) {
+               kfree(rx_queue->buffer);
+               rx_queue->buffer = NULL;
+       }
        return rc;
 }
 
-int efx_init_rx_queue(struct efx_rx_queue *rx_queue)
+void efx_init_rx_queue(struct efx_rx_queue *rx_queue)
 {
        struct efx_nic *efx = rx_queue->efx;
        unsigned int max_fill, trigger, limit;
@@ -833,7 +824,7 @@ int efx_init_rx_queue(struct efx_rx_queue *rx_queue)
        rx_queue->fast_fill_limit = limit;
 
        /* Set up RX descriptor ring */
-       return falcon_init_rx(rx_queue);
+       falcon_init_rx(rx_queue);
 }
 
 void efx_fini_rx_queue(struct efx_rx_queue *rx_queue)
@@ -872,7 +863,6 @@ void efx_remove_rx_queue(struct efx_rx_queue *rx_queue)
 
        kfree(rx_queue->buffer);
        rx_queue->buffer = NULL;
-       rx_queue->used = 0;
 }
 
 void efx_flush_lro(struct efx_channel *channel)