Commit 1abf6ab4 authored by Shang XiaoJing's avatar Shang XiaoJing Committed by Greg Kroah-Hartman

usb: cdc-wdm: Use skb_put_data() instead of skb_put/memcpy pair

Use skb_put_data() instead of skb_put() and memcpy(), which is clear.
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Acked-by: default avatarOliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20220927024344.14352-1-shangxiaojing@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7a827509
......@@ -958,7 +958,7 @@ static void wdm_wwan_rx(struct wdm_device *desc, int length)
if (!skb)
return;
memcpy(skb_put(skb, length), desc->inbuf, length);
skb_put_data(skb, desc->inbuf, length);
wwan_port_rx(port, skb);
/* inbuf has been copied, it is safe to check for outstanding data */
......
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