Skip to content

Commit afb8ece

Browse files
Colin KingJeff Kirsher
authored andcommitted
i40e: remove redundant check on vsi->active_vlans
active_vlans is an unsigned long array, hence a null check on this array is superfluous and can be removed. Detected with static analysis by smatch: drivers/net/ethernet/intel/i40e/i40e_debugfs.c:386 i40e_dbg_dump_vsi_seid() warn: this array is probably non-NULL. 'vsi->active_vlans' Signed-off-by: Colin Ian King <[email protected]> Acked-by: Shannon Nelson <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 4da46ce commit afb8ece

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/net/ethernet/intel/i40e/i40e_debugfs.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
147147
dev_info(&pf->pdev->dev, " vlan_features = 0x%08lx\n",
148148
(unsigned long int)nd->vlan_features);
149149
}
150-
if (vsi->active_vlans)
151-
dev_info(&pf->pdev->dev,
152-
" vlgrp: & = %p\n", vsi->active_vlans);
150+
dev_info(&pf->pdev->dev,
151+
" vlgrp: & = %p\n", vsi->active_vlans);
153152
dev_info(&pf->pdev->dev,
154153
" state = %li flags = 0x%08lx, netdev_registered = %i, current_netdev_flags = 0x%04x\n",
155154
vsi->state, vsi->flags,

0 commit comments

Comments
 (0)