diff mbox

[net,2/2] igb: Fix NULL assignment to incorrect variable in igb_reset_q_vector

Message ID 1428916512-25559-2-git-send-email-makita.toshiaki@lab.ntt.co.jp
State Accepted
Delegated to: Jeff Kirsher
Headers show

Commit Message

Toshiaki Makita April 13, 2015, 9:15 a.m. UTC
adapter->tx_ring is set to NULL where rx_ring should be.

Fixes: 5536d2102a2d ("igb: Combine q_vector and ring allocation into a single function")
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kirsher, Jeffrey T April 14, 2015, 1:02 p.m. UTC | #1
On Mon, 2015-04-13 at 18:15 +0900, Toshiaki Makita wrote:
> adapter->tx_ring is set to NULL where rx_ring should be.
> 
> Fixes: 5536d2102a2d ("igb: Combine q_vector and ring allocation into a
> single function")
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks Toshiaki, I have applied your patch to my queue.
Brown, Aaron F May 2, 2015, 1:32 a.m. UTC | #2
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On
> Behalf Of Jeff Kirsher
> Sent: Tuesday, April 14, 2015 6:03 AM
> To: Toshiaki Makita
> Cc: intel-wired-lan@lists.osuosl.org
> Subject: Re: [Intel-wired-lan] [PATCH net 2/2] igb: Fix NULL assignment to
> incorrect variable in igb_reset_q_vector
> 
> On Mon, 2015-04-13 at 18:15 +0900, Toshiaki Makita wrote:
> > adapter->tx_ring is set to NULL where rx_ring should be.
> >
> > Fixes: 5536d2102a2d ("igb: Combine q_vector and ring allocation into a
> > single function")
> > Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> > ---
> >  drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Thanks Toshiaki, I have applied your patch to my queue.

Tested-by: Aaron Brown <aaron.f.brown@intel.com>
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 010ddcb..b664512 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1036,7 +1036,7 @@  static void igb_reset_q_vector(struct igb_adapter *adapter, int v_idx)
 		adapter->tx_ring[q_vector->tx.ring->queue_index] = NULL;
 
 	if (q_vector->rx.ring)
-		adapter->tx_ring[q_vector->rx.ring->queue_index] = NULL;
+		adapter->rx_ring[q_vector->rx.ring->queue_index] = NULL;
 
 	netif_napi_del(&q_vector->napi);