projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[NET]: Avoid allocating skb in skb_pad
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
net
/
depca.c
diff --git
a/drivers/net/depca.c
b/drivers/net/depca.c
index 0941d40f046f326b84d68a84ca351398739d503a..e946c43d3b10ad23ec9a0deae5c536a53cc2cbaf 100644
(file)
--- a/
drivers/net/depca.c
+++ b/
drivers/net/depca.c
@@
-938,11
+938,8
@@
static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (skb->len < 1)
goto out;
- if (skb->len < ETH_ZLEN) {
- skb = skb_padto(skb, ETH_ZLEN);
- if (skb == NULL)
- goto out;
- }
+ if (skb_padto(skb, ETH_ZLEN))
+ goto out;
netif_stop_queue(dev);