Skip to contentSkip to conversation

net: wwan: iosm: fix kernel test robot reported error

PATCH Applied [email protected] 1 participant 1 message Nov 24, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 net: wwan: iosm: fix kernel test robot reported error

From: M Chetan Kumar <[email protected]>

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")

--
v2: No Change.

---
 drivers/net/wwan/iosm/iosm_ipc_mux_codec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wwan/iosm/iosm_ipc_mux_codec.c +1 -2
index d41e373f9c0a..c16365123660 100644
@@ -1471,8 +1471,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);
Signature · 1 line
2.34.1