Skip to content

Commit

Permalink
tty: ipwireless: check ppp register worked
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Sep 17, 2012
1 parent 41fda9c commit b6abc90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/tty/ipwireless/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b6abc90

Please sign in to comment.