aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/orinoco.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index da4c5e94a959..5db2bbad65c4 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -492,11 +492,9 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
492 492
493 /* Check packet length, pad short packets, round up odd length */ 493 /* Check packet length, pad short packets, round up odd length */
494 len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN); 494 len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN);
495 if (skb->len < len) { 495 skb = skb_padto(skb, len);
496 skb = skb_padto(skb, len); 496 if (skb == NULL)
497 if (skb == NULL) 497 goto fail;
498 goto fail;
499 }
500 len -= ETH_HLEN; 498 len -= ETH_HLEN;
501 499
502 eh = (struct ethhdr *)skb->data; 500 eh = (struct ethhdr *)skb->data;