summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/8021q/vlan.c4
-rw-r--r--net/8021q/vlanproc.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 03f7077524f5..7efda3575e40 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -547,7 +547,9 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
grp->vlan_devices[VLAN_ID] = new_dev;
- vlan_proc_add_dev(new_dev); /* create it's proc entry */
+ if (vlan_proc_add_dev(new_dev)<0)/* create it's proc entry */
+ printk(KERN_WARNING "VLAN: failed to add proc entry for %s\n",
+ new_dev->name);
if (real_dev->features & NETIF_F_HW_VLAN_FILTER)
real_dev->vlan_rx_add_vid(real_dev, VLAN_ID);
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 58233aa087aa..e4cf6c0757df 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -228,8 +228,10 @@ int vlan_proc_rem_dev(struct net_device *vlandev)
#endif
/** NOTE: This will consume the memory pointed to by dent, it seems. */
- remove_proc_entry(VLAN_DEV_INFO(vlandev)->dent->name, proc_vlan_dir);
- VLAN_DEV_INFO(vlandev)->dent = NULL;
+ if (VLAN_DEV_INFO(vlandev)->dent) {
+ remove_proc_entry(VLAN_DEV_INFO(vlandev)->dent->name, proc_vlan_dir);
+ VLAN_DEV_INFO(vlandev)->dent = NULL;
+ }
return 0;
}