]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/x25_asy.c
Merge branch 'master'
[linux-2.6-omap-h63xx.git] / drivers / net / wan / x25_asy.c
index 8c5cfcb55826b522244947ac6cd2f373ae6d1c90..bdf672c48182a148dd5420f4aee505f340d2114e 100644 (file)
@@ -107,13 +107,9 @@ static struct x25_asy *x25_asy_alloc(void)
 static void x25_asy_free(struct x25_asy *sl)
 {
        /* Free all X.25 frame buffers. */
-       if (sl->rbuff)  {
-               kfree(sl->rbuff);
-       }
+       kfree(sl->rbuff);
        sl->rbuff = NULL;
-       if (sl->xbuff)  {
-               kfree(sl->xbuff);
-       }
+       kfree(sl->xbuff);
        sl->xbuff = NULL;
 
        if (!test_and_clear_bit(SLF_INUSE, &sl->flags)) {
@@ -134,10 +130,8 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu)
        {
                printk("%s: unable to grow X.25 buffers, MTU change cancelled.\n",
                       dev->name);
-               if (xbuff != NULL)  
-                       kfree(xbuff);
-               if (rbuff != NULL)  
-                       kfree(rbuff);
+               kfree(xbuff);
+               kfree(rbuff);
                return -ENOMEM;
        }
 
@@ -169,10 +163,8 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu)
 
        spin_unlock_bh(&sl->lock);
 
-       if (xbuff != NULL) 
-               kfree(xbuff);
-       if (rbuff != NULL)
-               kfree(rbuff);
+       kfree(xbuff);
+       kfree(rbuff);
        return 0;
 }
 
@@ -837,7 +829,7 @@ static void __exit exit_x25_asy(void)
        }
 
        kfree(x25_asy_devs);
-       tty_register_ldisc(N_X25, NULL);
+       tty_unregister_ldisc(N_X25);
 }
 
 module_init(init_x25_asy);