aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2005-10-18 21:30:58 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-18 22:27:14 -0400
commit36841c9d02870983c2b08c85d56572c1ff011997 (patch)
tree367bdf81afd8fdc64147f95cb23493432449c05b /drivers/net
parent9f38c636ababfb41e58c9ec1e9719492ef7f0479 (diff)
[PATCH] orinoco: remove redundance skb length check before padding
Checking the skb->len value before calling skb_padto is redundant. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
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 da4c5e94a95..5db2bbad65c 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)
/* 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;