]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tty: ipwireless: check ppp register worked
authorAlan Cox <alan@linux.intel.com>
Mon, 17 Sep 2012 11:01:40 +0000 (12:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Sep 2012 11:45:30 +0000 (04:45 -0700)
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>
drivers/tty/ipwireless/network.c

index 57c8b481113f79fd01c96ddbcde3ca013fc6cb5b..d2af155dec8b91e1f915feb8b6c9f8be26f9e815 100644 (file)
@@ -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;
        }