diff options
Diffstat (limited to 'drivers/tty/ipwireless/network.c')
-rw-r--r-- | drivers/tty/ipwireless/network.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/tty/ipwireless/network.c b/drivers/tty/ipwireless/network.c index 57c8b481113f..57102e66165a 100644 --- a/drivers/tty/ipwireless/network.c +++ b/drivers/tty/ipwireless/network.c @@ -274,7 +274,12 @@ static void do_go_online(struct work_struct *work_go_online) network->xaccm[0] = ~0U; network->xaccm[3] = 0x60000000U; network->raccm = ~0U; - ppp_register_channel(channel); + if (ppp_register_channel(channel) < 0) { + printk(KERN_ERR IPWIRELESS_PCCARD_NAME + ": unable to register PPP channel\n"); + kfree(channel); + return; + } spin_lock_irqsave(&network->lock, flags); network->ppp_channel = channel; } @@ -430,8 +435,8 @@ void ipwireless_network_free(struct ipw_network *network) network->shutting_down = 1; ipwireless_ppp_close(network); - flush_work_sync(&network->work_go_online); - flush_work_sync(&network->work_go_offline); + flush_work(&network->work_go_online); + flush_work(&network->work_go_offline); ipwireless_stop_interrupts(network->hardware); ipwireless_associate_network(network->hardware, NULL); |