提交 36841c9d 编写于 作者: J John W. Linville 提交者: Jeff Garzik

[PATCH] orinoco: remove redundance skb length check before padding

Checking the skb->len value before calling skb_padto is redundant.
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 9f38c636
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册