* [2.6 patch] net/8021q/vlanproc.c: fix check-after-use
@ 2007-08-14 21:22 Adrian Bunk
2007-08-15 0:39 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2007-08-14 21:22 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
The Coverity checker spotted that we'd have already oops'ed if "vlandev"
was NULL.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
--- linux-2.6.23-rc1-mm2/net/8021q/vlanproc.c.old 2007-08-08 06:22:40.000000000 +0200
+++ linux-2.6.23-rc1-mm2/net/8021q/vlanproc.c 2007-08-08 06:23:13.000000000 +0200
@@ -314,17 +314,17 @@
static int vlandev_seq_show(struct seq_file *seq, void *offset)
{
struct net_device *vlandev = (struct net_device *) seq->private;
const struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev);
struct net_device_stats *stats;
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",
vlandev->name, dev_info->vlan_id,
(int)(dev_info->flags & 1), vlandev->priv_flags);
stats = vlan_dev_get_stats(vlandev);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [2.6 patch] net/8021q/vlanproc.c: fix check-after-use
2007-08-14 21:22 [2.6 patch] net/8021q/vlanproc.c: fix check-after-use Adrian Bunk
@ 2007-08-15 0:39 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-08-15 0:39 UTC (permalink / raw)
To: bunk; +Cc: netdev, linux-kernel
From: Adrian Bunk <bunk@kernel.org>
Date: Tue, 14 Aug 2007 23:22:44 +0200
> The Coverity checker spotted that we'd have already oops'ed if "vlandev"
> was NULL.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Fair enough, applied, thanks Adrian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-15 0:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-14 21:22 [2.6 patch] net/8021q/vlanproc.c: fix check-after-use Adrian Bunk
2007-08-15 0:39 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).