]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: wwan: iosm: fix kernel test robot reported error
authorM Chetan Kumar <m.chetan.kumar@linux.intel.com>
Thu, 24 Nov 2022 10:37:46 +0000 (16:07 +0530)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 13:02:49 +0000 (14:02 +0100)
[ Upstream commit 985a02e75881b73a43c9433a718b49d272a9dd6b ]

sparse warnings - iosm_ipc_mux_codec.c:1474 using plain
integer as NULL pointer.

Use skb_trim() to reset skb tail & len.

Fixes: 9413491e20e1 ("net: iosm: encode or decode datagram")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit c667751a42653e866ca3e5c6ede97dd779c6083c)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
drivers/net/wwan/iosm/iosm_ipc_mux_codec.c

index bdb2d32cdb6d791100c52b53de12a767a7bb1550..e323fe1ae5380a122c90322458a0c2d708ddd25a 100644 (file)
@@ -830,8 +830,7 @@ void ipc_mux_ul_encoded_process(struct iosm_mux *ipc_mux, struct sk_buff *skb)
                        ipc_mux->ul_data_pend_bytes);
 
        /* Reset the skb settings. */
-       skb->tail = 0;
-       skb->len = 0;
+       skb_trim(skb, 0);
 
        /* Add the consumed ADB to the free list. */
        skb_queue_tail((&ipc_mux->ul_adb.free_list), skb);