diff options
author | Alan Cox <alan@linux.intel.com> | 2012-09-17 15:01:40 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-17 15:45:30 +0400 |
commit | b6abc90480a6bff2c2ff4904b7ae708f51ce8c03 (patch) | |
tree | aab5ac65d5f10259c35a019d55deb5b62e3f1384 /drivers/tty/ipwireless | |
parent | 41fda9c4d9437846f4ca667e134c6d840f67b9c2 (diff) |
tty: ipwireless: check ppp register worked
Otherwise we start trying to use a bogus channel - ungood.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/ipwireless')
-rw-r--r-- | drivers/tty/ipwireless/network.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/tty/ipwireless/network.c b/drivers/tty/ipwireless/network.c index 57c8b481113f..d2af155dec8b 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; } |