diff options
| author | M Chetan Kumar <[email protected]> | 2022-11-24 10:37:46 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-11-28 11:31:59 +0000 |
| commit | 985a02e75881b73a43c9433a718b49d272a9dd6b (patch) | |
| tree | 004f099563f08c7ac976123c26a5886acfe10482 /drivers/net/wwan/iosm/iosm_ipc_mux_codec.c | |
| parent | net: phylink: fix PHY validation with rate adaption (diff) | |
| download | kernel-985a02e75881b73a43c9433a718b49d272a9dd6b.tar.gz kernel-985a02e75881b73a43c9433a718b49d272a9dd6b.zip | |
net: wwan: iosm: fix kernel test robot reported error
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 <[email protected]>
Signed-off-by: M Chetan Kumar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/wwan/iosm/iosm_ipc_mux_codec.c')
| -rw-r--r-- | drivers/net/wwan/iosm/iosm_ipc_mux_codec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c index d41e373f9c0a..c16365123660 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c +++ b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c @@ -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); |
