Skip to content

Commit 84b9cd6

Browse files
edumazetdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 15c77d8 commit 84b9cd6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/core/dev.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3981,8 +3981,7 @@ struct sk_buff *napi_get_frags(struct napi_struct *napi)
39813981

39823982
if (!skb) {
39833983
skb = netdev_alloc_skb_ip_align(napi->dev, GRO_MAX_HEAD);
3984-
if (skb)
3985-
napi->skb = skb;
3984+
napi->skb = skb;
39863985
}
39873986
return skb;
39883987
}

0 commit comments

Comments
 (0)