Explorar o código

[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 <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Adrian Bunk %!s(int64=18) %!d(string=hai) anos
pai
achega
16f3051b16
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      net/8021q/vlanproc.c

+ 1 - 1
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",