ppp: Use common code in ppp_push()
Subsystems (3)
PATCH 1/1 ppp: Use common code in ppp_push()
From: Markus Elfring <[email protected]>
Date: Mon, 7 Sep 2026 21:32:36 +0200
Use an additional label so that two common statements can be better reused at the end of this function implementation.
Signed-off-by Markus Elfring <[email protected]>
--- drivers/net/ppp/ppp_generic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/ppp/ppp_generic.c +3 -4
@@ -1908,11 +1908,9 @@ ppp_push(struct ppp *ppp, struct sk_buff *skb)struct channel *pch; list = &ppp->channels; -if (list_empty (list)) { +if (list_empty (list))/* nowhere to send the packet, just drop it */ -kfree_skb (skb); -return 1 ; - } + goto free_skb;if ((ppp->flags &SC_MULTILINK ) ==0 ) {struct ppp_channel *chan;
@@ -1946,6 +1944,7 @@ ppp_push(struct ppp *ppp, struct sk_buff *skb)return 0 ;#endif /* CONFIG_PPP_MULTILINK */ +free_skb:kfree_skb (skb);return 1 ; }
Signature · 1 line
2.55.0