net/virtio: remove unnecessary Rx error assignments
authorTiwei Bie <tiwei.bie@intel.com>
Wed, 25 Jul 2018 07:42:06 +0000 (15:42 +0800)
committerTiwei Bie <tiwei.bie@intel.com>
Thu, 2 Aug 2018 02:41:51 +0000 (04:41 +0200)
Remove the unnecessary assignments in Rx functions
as they are useless and misleading.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
drivers/net/virtio/virtio_rxtx.c

index 7c10522..eb89143 100644 (file)
@@ -960,7 +960,6 @@ virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
        rxvq->stats.packets += nb_rx;
 
        /* Allocate new mbuf for the used descriptor */
-       error = ENOSPC;
        while (likely(!virtqueue_full(vq))) {
                new_mbuf = rte_mbuf_raw_alloc(rxvq->mpool);
                if (unlikely(new_mbuf == NULL)) {
@@ -1319,7 +1318,6 @@ virtio_recv_mergeable_pkts(void *rx_queue,
        rxvq->stats.packets += nb_rx;
 
        /* Allocate new mbuf for the used descriptor */
-       error = ENOSPC;
        while (likely(!virtqueue_full(vq))) {
                new_mbuf = rte_mbuf_raw_alloc(rxvq->mpool);
                if (unlikely(new_mbuf == NULL)) {