Skip to content

Commit

Permalink
[VLAN] net/8021q/vlanproc.c: fix check-after-use
Browse files Browse the repository at this point in the history
The Coverity checker spotted that we'd have already oops'ed if
"vlandev" was NULL.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Adrian Bunk authored and David S. Miller committed Aug 15, 2007
1 parent 6f93b9c commit 16f3051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/8021q/vlanproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
static const char fmt[] = "%30s %12lu\n";
int i;

if ((vlandev == NULL) || (!(vlandev->priv_flags & IFF_802_1Q_VLAN)))
if (!(vlandev->priv_flags & IFF_802_1Q_VLAN))
return 0;

seq_printf(seq, "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n",
Expand Down

0 comments on commit 16f3051

Please sign in to comment.