Skip to content

Commit

Permalink
[NET] ppp: Remove unnecessary pskb_may_pull
Browse files Browse the repository at this point in the history
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 <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 18, 2006
1 parent 364c6ba commit c8c9f9a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c8c9f9a

Please sign in to comment.