net: wwan: iosm: remove pointless null check
authorJakub Kicinski <kuba@kernel.org>
Thu, 19 May 2022 00:43:42 +0000 (17:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 09:30:00 +0000 (11:30 +0200)
commit6427605fa7815b312b3a06f7d0299933b1e092e3
tree8149af8e79e9dccdfcd14570649ae37ce8f8f98b
parente1ad7a011591d4a508a08e180ae0471224fcc17c
net: wwan: iosm: remove pointless null check

commit dbbc7d04c549a43ad343c69e17b27a57e2102041 upstream.

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>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c