Commit 8b72ff64 authored by Alan Cox's avatar Alan Cox Committed by David S. Miller

wanmain: comparing array with NULL

gcc really should warn about these !
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c66b9b7d
...@@ -602,36 +602,31 @@ static int wanrouter_device_new_if(struct wan_device *wandev, ...@@ -602,36 +602,31 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
* successfully, add it to the interface list. * successfully, add it to the interface list.
*/ */
if (dev->name == NULL) { #ifdef WANDEBUG
err = -EINVAL; printk(KERN_INFO "%s: registering interface %s...\n",
} else { wanrouter_modname, dev->name);
#endif
#ifdef WANDEBUG err = register_netdev(dev);
printk(KERN_INFO "%s: registering interface %s...\n", if (!err) {
wanrouter_modname, dev->name); struct net_device *slave = NULL;
#endif unsigned long smp_flags=0;
err = register_netdev(dev); lock_adapter_irq(&wandev->lock, &smp_flags);
if (!err) {
struct net_device *slave = NULL; if (wandev->dev == NULL) {
unsigned long smp_flags=0; wandev->dev = dev;
} else {
lock_adapter_irq(&wandev->lock, &smp_flags); for (slave=wandev->dev;
DEV_TO_SLAVE(slave);
if (wandev->dev == NULL) { slave = DEV_TO_SLAVE(slave))
wandev->dev = dev; DEV_TO_SLAVE(slave) = dev;
} else {
for (slave=wandev->dev;
DEV_TO_SLAVE(slave);
slave = DEV_TO_SLAVE(slave))
DEV_TO_SLAVE(slave) = dev;
}
++wandev->ndev;
unlock_adapter_irq(&wandev->lock, &smp_flags);
err = 0; /* done !!! */
goto out;
} }
++wandev->ndev;
unlock_adapter_irq(&wandev->lock, &smp_flags);
err = 0; /* done !!! */
goto out;
} }
if (wandev->del_if) if (wandev->del_if)
wandev->del_if(wandev, dev); wandev->del_if(wandev, dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment