|
@@ -923,6 +923,8 @@ int i40e_setup_tx_descriptors(struct i40e_ring *tx_ring)
|
|
|
if (!dev)
|
|
|
return -ENOMEM;
|
|
|
|
|
|
+ /* warn if we are about to overwrite the pointer */
|
|
|
+ WARN_ON(tx_ring->tx_bi);
|
|
|
bi_size = sizeof(struct i40e_tx_buffer) * tx_ring->count;
|
|
|
tx_ring->tx_bi = kzalloc(bi_size, GFP_KERNEL);
|
|
|
if (!tx_ring->tx_bi)
|
|
@@ -1083,6 +1085,8 @@ int i40e_setup_rx_descriptors(struct i40e_ring *rx_ring)
|
|
|
struct device *dev = rx_ring->dev;
|
|
|
int bi_size;
|
|
|
|
|
|
+ /* warn if we are about to overwrite the pointer */
|
|
|
+ WARN_ON(rx_ring->rx_bi);
|
|
|
bi_size = sizeof(struct i40e_rx_buffer) * rx_ring->count;
|
|
|
rx_ring->rx_bi = kzalloc(bi_size, GFP_KERNEL);
|
|
|
if (!rx_ring->rx_bi)
|