[patch 2.6.14-rc4] orinoco: remove redundance skb length check before padding

Subsystems: networking drivers (wireless), the rest

STALE7628d

2 messages, 2 authors, 2005-10-19 · open the first message on its own page

[patch 2.6.14-rc4] orinoco: remove redundance skb length check before padding

From: John W. Linville <hidden>
Date: 2005-10-19 01:36:08

Checking the skb->len value before calling skb_padto is redundant.

Signed-off-by: John W. Linville <redacted>
---

 drivers/net/wireless/orinoco.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -505,11 +505,9 @@ static int orinoco_xmit(struct sk_buff *
 
 	/* 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;

Re: [patch 2.6.14-rc4] orinoco: remove redundance skb length check before padding

From: Jeff Garzik <hidden>
Date: 2005-10-19 02:27:37

applied
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help