Pull acpica into release branch
[pandora-kernel.git] / drivers / net / pppoe.c
index 9369f81..0d101a1 100644 (file)
@@ -337,8 +337,7 @@ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb)
        if (sk->sk_state & PPPOX_BOUND) {
                struct pppoe_hdr *ph = (struct pppoe_hdr *) skb->nh.raw;
                int len = ntohs(ph->length);
-               skb_pull(skb, sizeof(struct pppoe_hdr));
-               skb_postpull_rcsum(skb, ph, sizeof(*ph));
+               skb_pull_rcsum(skb, sizeof(struct pppoe_hdr));
                if (pskb_trim_rcsum(skb, len))
                        goto abort_kfree;
 
@@ -862,6 +861,9 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
                 * give dev_queue_xmit something it can free.
                 */
                skb2 = skb_clone(skb, GFP_ATOMIC);
+
+               if (skb2 == NULL)
+                       goto abort;
        }
 
        ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr));