Commit 17b7abbf authored by Jann Horn's avatar Jann Horn Committed by Greg Kroah-Hartman

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: default avatarJann Horn <jannh@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cbebe5d0
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment