Commit 535657f5 authored by Stephen Hemminger's avatar Stephen Hemminger

[NET]: Fix register_netdev() return value check in synclink_cs.c

parent d900a3a6
...@@ -4232,7 +4232,7 @@ void mgslpc_sppp_init(MGSLPC_INFO *info) ...@@ -4232,7 +4232,7 @@ void mgslpc_sppp_init(MGSLPC_INFO *info)
d->tx_timeout = mgslpc_sppp_tx_timeout; d->tx_timeout = mgslpc_sppp_tx_timeout;
d->watchdog_timeo = 10*HZ; d->watchdog_timeo = 10*HZ;
if (register_netdev(d) == -1) { if (register_netdev(d)) {
printk(KERN_WARNING "%s: register_netdev failed.\n", d->name); printk(KERN_WARNING "%s: register_netdev failed.\n", d->name);
sppp_detach(info->netdev); sppp_detach(info->netdev);
return; return;
......
...@@ -7847,7 +7847,7 @@ void mgsl_sppp_init(struct mgsl_struct *info) ...@@ -7847,7 +7847,7 @@ void mgsl_sppp_init(struct mgsl_struct *info)
d->tx_timeout = mgsl_sppp_tx_timeout; d->tx_timeout = mgsl_sppp_tx_timeout;
d->watchdog_timeo = 10*HZ; d->watchdog_timeo = 10*HZ;
if (register_netdev(d) == -1) { if (register_netdev(d)) {
printk(KERN_WARNING "%s: register_netdev failed.\n", d->name); printk(KERN_WARNING "%s: register_netdev failed.\n", d->name);
sppp_detach(info->netdev); sppp_detach(info->netdev);
return; return;
......
...@@ -1653,7 +1653,7 @@ static void sppp_init(SLMP_INFO *info) ...@@ -1653,7 +1653,7 @@ static void sppp_init(SLMP_INFO *info)
d->tx_timeout = sppp_cb_tx_timeout; d->tx_timeout = sppp_cb_tx_timeout;
d->watchdog_timeo = 10*HZ; d->watchdog_timeo = 10*HZ;
if (register_netdev(d) == -1) { if (register_netdev(d)) {
printk(KERN_WARNING "%s: register_netdev failed.\n", d->name); printk(KERN_WARNING "%s: register_netdev failed.\n", d->name);
sppp_detach(info->netdev); sppp_detach(info->netdev);
return; return;
......
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