Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36841c9d authored by John W. Linville's avatar John W. Linville Committed by Jeff Garzik
Browse files

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



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

Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 9f38c636
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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;
	}
	len -= ETH_HLEN;

	eh = (struct ethhdr *)skb->data;