forked from Minki/linux
staging: visornic: use skb_put_zero() instead of open-coded version
Replace an open-coded version of skb_put_zero() with a call to the helper. This is a cleanup and is also useful for potentially adding KASAN integration to SKBs in the future. Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cbebe5d05d
commit
17b7abbf1e
@ -896,9 +896,7 @@ static netdev_tx_t visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
((skb_end_pointer(skb) - skb->data) >= ETH_MIN_PACKET_SIZE)) {
|
||||
/* pad the packet out to minimum size */
|
||||
padlen = ETH_MIN_PACKET_SIZE - len;
|
||||
memset(&skb->data[len], 0, padlen);
|
||||
skb->tail += padlen;
|
||||
skb->len += padlen;
|
||||
skb_put_zero(skb, padlen);
|
||||
len += padlen;
|
||||
firstfraglen += padlen;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user