summaryrefslogtreecommitdiffstats
path: root/drivers/net/wwan/iosm
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-05-18 17:43:42 -0700
committerJakub Kicinski <kuba@kernel.org>2022-05-19 18:44:44 -0700
commitdbbc7d04c549a43ad343c69e17b27a57e2102041 (patch)
treeec16c32e9842de9a2c8e319b8fdfa4610cccdd90 /drivers/net/wwan/iosm
parent53332f845194b8dedf213c5bf51c2d4af88364ee (diff)
downloadlinux-stable-dbbc7d04c549a43ad343c69e17b27a57e2102041.tar.gz
linux-stable-dbbc7d04c549a43ad343c69e17b27a57e2102041.tar.bz2
linux-stable-dbbc7d04c549a43ad343c69e17b27a57e2102041.zip
net: wwan: iosm: remove pointless null check
GCC 12 warns: drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c: In function ‘ipc_protocol_dl_td_process’: drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c:406:13: warning: the comparison will always evaluate as ‘true’ for the address of ‘cb’ will never be NULL [-Waddress] 406 | if (!IPC_CB(skb)) { | ^ Indeed the check seems entirely pointless. Hopefully the other validation checks will catch if the cb is bad, but it can't be NULL. Reviewed-by: M Chetan Kumar <m.chetan.kumar@intel.com> Link: https://lore.kernel.org/r/20220519004342.2109832-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/wwan/iosm')
-rw-r--r--drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c b/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c
index c6b032f95d2e..4627847c6daa 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c
@@ -372,8 +372,6 @@ bool ipc_protocol_dl_td_prepare(struct iosm_protocol *ipc_protocol,
struct sk_buff *ipc_protocol_dl_td_process(struct iosm_protocol *ipc_protocol,
struct ipc_pipe *pipe)
{
- u32 tail =
- le32_to_cpu(ipc_protocol->p_ap_shm->tail_array[pipe->pipe_nr]);
struct ipc_protocol_td *p_td;
struct sk_buff *skb;
@@ -403,14 +401,6 @@ struct sk_buff *ipc_protocol_dl_td_process(struct iosm_protocol *ipc_protocol,
goto ret;
}
- if (!IPC_CB(skb)) {
- dev_err(ipc_protocol->dev, "pipe# %d, tail: %d skb_cb is NULL",
- pipe->pipe_nr, tail);
- ipc_pcie_kfree_skb(ipc_protocol->pcie, skb);
- skb = NULL;
- goto ret;
- }
-
if (p_td->buffer.address != IPC_CB(skb)->mapping) {
dev_err(ipc_protocol->dev, "invalid buf=%llx or skb=%p",
(unsigned long long)p_td->buffer.address, skb->data);