summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2013-12-05 21:44:27 -0800
committerDavid S. Miller <davem@davemloft.net>2013-12-06 12:51:40 -0500
commit84b9cd633bc35a028b313178829ee313525f6892 (patch)
treed087ea7d0344b394bfcafa035f563cb7f1cf8a68 /net/core
parent15c77d8b3be5a7f451035e6487127f58e5f872fa (diff)
downloadlinux-84b9cd633bc35a028b313178829ee313525f6892.tar.bz2
gro: small napi_get_frags() optim
Remove one useless conditional branch : napi->skb is NULL, so nothing bad can happen. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index ba3b7ea5ebb3..c98052487e98 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3981,8 +3981,7 @@ struct sk_buff *napi_get_frags(struct napi_struct *napi)
if (!skb) {
skb = netdev_alloc_skb_ip_align(napi->dev, GRO_MAX_HEAD);
- if (skb)
- napi->skb = skb;
+ napi->skb = skb;
}
return skb;
}