ixgbe: Fix compiler warning about variable being used uninitialized

tc is still throwing a warning that is could be used
uninitialized. This fixes it, and properly formats the device ID
checks for the use of this variable.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by PJ Waskiewicz and committed by David S. Miller 6837e895 530e557a

+7 -2
+7 -2
drivers/net/ixgbe/ixgbe_main.c
··· 262 262 int reg_idx = tx_ring->reg_idx; 263 263 int dcb_i = adapter->ring_feature[RING_F_DCB].indices; 264 264 265 - if (adapter->hw.mac.type == ixgbe_mac_82598EB) { 265 + switch (adapter->hw.mac.type) { 266 + case ixgbe_mac_82598EB: 266 267 tc = reg_idx >> 2; 267 268 txoff = IXGBE_TFCS_TXOFF0; 268 - } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) { 269 + break; 270 + case ixgbe_mac_82599EB: 269 271 tc = 0; 270 272 txoff = IXGBE_TFCS_TXOFF; 271 273 if (dcb_i == 8) { ··· 286 284 tc += (reg_idx - 96) >> 4; 287 285 } 288 286 } 287 + break; 288 + default: 289 + tc = 0; 289 290 } 290 291 txoff <<= tc; 291 292 }