From: Herbert Xu Date: Fri, 9 Jun 2006 23:11:27 +0000 (-0700) Subject: [NET] ppp: Remove unnecessary pskb_may_pull X-Git-Tag: v2.6.18-rc1~1111^2~31 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8c9f9a3de2c50c876b1068dd41f9a06c5749f80;p=linux-2.6 [NET] ppp: Remove unnecessary pskb_may_pull In ppp_receive_nonmp_frame, we call pskb_may_pull(skb, skb->len) if the tailroom is >= 124. This is pointless because this pskb_may_pull is only needed if the skb is non-linear. However, if it is non-linear then the tailroom would be zero. So it can be safely removed. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index b2073fce82..01cd8ec751 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c @@ -1609,8 +1609,6 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) kfree_skb(skb); skb = ns; } - else if (!pskb_may_pull(skb, skb->len)) - goto err; else skb->ip_summed = CHECKSUM_NONE;