Skip to contentSkip to conversation

orinoco: remove redundance skb length check before padding

PATCH Applied John W. Linville 2 participants 2 messages Oct 19, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 orinoco: remove redundance skb length check before padding

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

---

 drivers/net/wireless/orinoco.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
drivers/net/wireless/orinoco.c +3 -5
@@ -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;