ibmvnic: Fix RX queue buffer cleanup
[sfrench/cifs-2.6.git] / drivers / net / ethernet / ibm / ibmvnic.c
index 27a6df30eafd28e6f2af2b647769e9f0857546ea..066897a350a589a44243d9b66b933bca73546bf6 100644 (file)
@@ -485,8 +485,8 @@ static void release_rx_pools(struct ibmvnic_adapter *adapter)
 
                for (j = 0; j < rx_pool->size; j++) {
                        if (rx_pool->rx_buff[j].skb) {
-                               dev_kfree_skb_any(rx_pool->rx_buff[i].skb);
-                               rx_pool->rx_buff[i].skb = NULL;
+                               dev_kfree_skb_any(rx_pool->rx_buff[j].skb);
+                               rx_pool->rx_buff[j].skb = NULL;
                        }
                }