netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2.6.14-rc4] orinoco: remove redundance skb length check before padding
@ 2005-10-19  1:30 John W. Linville
  2005-10-19  2:27 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: John W. Linville @ 2005-10-19  1:30 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: jgarzik, proski, hermes, orinoco-devel

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 2.6.14-rc4] orinoco: remove redundance skb length check before padding
  2005-10-19  1:30 [patch 2.6.14-rc4] orinoco: remove redundance skb length check before padding John W. Linville
@ 2005-10-19  2:27 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2005-10-19  2:27 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-kernel, netdev, proski, hermes, orinoco-devel

applied

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-19  2:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-19  1:30 [patch 2.6.14-rc4] orinoco: remove redundance skb length check before padding John W. Linville
2005-10-19  2:27 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).