From: John W. Linville Date: Wed, 19 Oct 2005 01:30:58 +0000 (-0400) Subject: [PATCH] orinoco: remove redundance skb length check before padding X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=36841c9d02870983c2b08c85d56572c1ff011997;p=openwrt%2Fstaging%2Fblogic.git [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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index da4c5e94a959..5db2bbad65c4 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;