Skip to content

Commit 382a7c2

Browse files
jjagielskanguy11
authored andcommitted
igb: Fix position of assignment to *ring
Assignment to *ring should be done after correctness check of the argument queue. Fixes: 91db364 ("igb: Refactor igb_configure_cbs()") Signed-off-by: Jedrzej Jagielski <[email protected]> Acked-by: Vinicius Costa Gomes <[email protected]> Tested-by: Tony Brelinski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 6c19d77 commit 382a7c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,14 +1685,15 @@ static bool is_any_txtime_enabled(struct igb_adapter *adapter)
16851685
**/
16861686
static void igb_config_tx_modes(struct igb_adapter *adapter, int queue)
16871687
{
1688-
struct igb_ring *ring = adapter->tx_ring[queue];
16891688
struct net_device *netdev = adapter->netdev;
16901689
struct e1000_hw *hw = &adapter->hw;
1690+
struct igb_ring *ring;
16911691
u32 tqavcc, tqavctrl;
16921692
u16 value;
16931693

16941694
WARN_ON(hw->mac.type != e1000_i210);
16951695
WARN_ON(queue < 0 || queue > 1);
1696+
ring = adapter->tx_ring[queue];
16961697

16971698
/* If any of the Qav features is enabled, configure queues as SR and
16981699
* with HIGH PRIO. If none is, then configure them with LOW PRIO and

0 commit comments

Comments
 (0)