Commit 36841c9d authored by John W. Linville's avatar John W. Linville Committed by Jeff Garzik

[PATCH] orinoco: remove redundance skb length check before padding

Checking the skb->len value before calling skb_padto is redundant.
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 9f38c636
......@@ -492,11 +492,9 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
/* Check packet length, pad short packets, round up odd length */
len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN);
if (skb->len < len) {
skb = skb_padto(skb, len);
if (skb == NULL)
goto fail;
}
skb = skb_padto(skb, len);
if (skb == NULL)
goto fail;
len -= ETH_HLEN;
eh = (struct ethhdr *)skb->data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment