[NET]: Avoid allocating skb in skb_pad
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / net / hp100.c
index 247c8ca86033693bfe99b01680ede5a54a3fe5f2..dd1dc32dc98dc3181db5bb41be53f550bd3e1844 100644 (file)
@@ -1487,11 +1487,8 @@ static int hp100_start_xmit_bm(struct sk_buff *skb, struct net_device *dev)
        if (skb->len <= 0)
                return 0;
                
-       if (skb->len < ETH_ZLEN && lp->chip == HP100_CHIPID_SHASTA) {
-               skb = skb_padto(skb, ETH_ZLEN);
-               if (skb == NULL)
-                       return 0;
-       }
+       if (lp->chip == HP100_CHIPID_SHASTA && skb_padto(skb, ETH_ZLEN))
+               return 0;
 
        /* Get Tx ring tail pointer */
        if (lp->txrtail->next == lp->txrhead) {