]> Pileus Git - ~andy/linux/blobdiff - drivers/net/ppp_synctty.c
ppp: remove some pointless conditionals before kfree_skb()
[~andy/linux] / drivers / net / ppp_synctty.c
index 801d8f99d4714155e2f3b3f9c0879ec15d2de8ba..3ea791d16b00110b5c9d44e2d4211cd7c401ab40 100644 (file)
@@ -281,8 +281,7 @@ ppp_sync_close(struct tty_struct *tty)
 
        ppp_unregister_channel(&ap->chan);
        skb_queue_purge(&ap->rqueue);
-       if (ap->tpkt)
-               kfree_skb(ap->tpkt);
+       kfree_skb(ap->tpkt);
        kfree(ap);
 }
 
@@ -333,9 +332,6 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
        err = -EFAULT;
        switch (cmd) {
        case PPPIOCGCHAN:
-               err = -ENXIO;
-               if (!ap)
-                       break;
                err = -EFAULT;
                if (put_user(ppp_channel_index(&ap->chan), p))
                        break;
@@ -343,9 +339,6 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
                break;
 
        case PPPIOCGUNIT:
-               err = -ENXIO;
-               if (!ap)
-                       break;
                err = -EFAULT;
                if (put_user(ppp_unit_number(&ap->chan), p))
                        break;