mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
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: Shang XiaoJing <shangxiaojing@huawei.com> Acked-by: Oliver Neukum <oneukum@suse.com> Link: https://lore.kernel.org/r/20220927024344.14352-1-shangxiaojing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7a82750993
commit
1abf6ab490
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user