ppp: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb(). Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
875b48297b
commit
1d2f8c9507
|
@ -233,10 +233,8 @@ ppp_asynctty_close(struct tty_struct *tty)
|
|||
tasklet_kill(&ap->tsk);
|
||||
|
||||
ppp_unregister_channel(&ap->chan);
|
||||
if (ap->rpkt)
|
||||
kfree_skb(ap->rpkt);
|
||||
skb_queue_purge(&ap->rqueue);
|
||||
if (ap->tpkt)
|
||||
kfree_skb(ap->tpkt);
|
||||
kfree(ap);
|
||||
}
|
||||
|
|
|
@ -1245,7 +1245,6 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
|
|||
return;
|
||||
|
||||
drop:
|
||||
if (skb)
|
||||
kfree_skb(skb);
|
||||
++ppp->dev->stats.tx_errors;
|
||||
}
|
||||
|
@ -2658,7 +2657,6 @@ static void ppp_destroy_interface(struct ppp *ppp)
|
|||
ppp->active_filter = NULL;
|
||||
#endif /* CONFIG_PPP_FILTER */
|
||||
|
||||
if (ppp->xmit_pending)
|
||||
kfree_skb(ppp->xmit_pending);
|
||||
|
||||
free_netdev(ppp->dev);
|
||||
|
|
|
@ -281,7 +281,6 @@ 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(ap);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue