From: Adrian Bunk Date: Wed, 15 Aug 2007 00:39:43 +0000 (-0700) Subject: [VLAN] net/8021q/vlanproc.c: fix check-after-use X-Git-Tag: v2.6.23-rc4~128^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16f3051b166bde3f1bd741783b64a8feebdb6f00;p=linux-2.6 [VLAN] net/8021q/vlanproc.c: fix check-after-use The Coverity checker spotted that we'd have already oops'ed if "vlandev" was NULL. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller --- diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index c0040c9064..bd08aa0907 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c @@ -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",