]> git.baikalelectronics.ru Git - kernel.git/commit
net: wwan: t7xx: Fix smatch errors
authorRicardo Martinez <ricardo.martinez@linux.intel.com>
Wed, 18 May 2022 19:55:29 +0000 (12:55 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 20 May 2022 01:37:09 +0000 (18:37 -0700)
commitb9b9fe2ba525fad185887e4bb258ec499fc619df
tree9bb5bdf07de561070ad8778db47b87534e13f0db
parent0466fdc3a9b47247cea95de12896f24aabeb0291
net: wwan: t7xx: Fix smatch errors

t7xx_request_irq() error: uninitialized symbol 'ret'.

t7xx_core_hk_handler() error: potentially dereferencing uninitialized 'event'.
If the condition to enter the loop that waits for the handshake event
is false on the first iteration then the uninitialized 'event' will be
dereferenced, fix this by initializing 'event' to NULL.

t7xx_port_proxy_recv_skb() warn: variable dereferenced before check 'skb'.
No need to check skb at t7xx_port_proxy_recv_skb() since we know it
is always called with a valid skb by t7xx_cldma_gpd_rx_from_q().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>
Link: https://lore.kernel.org/r/20220518195529.126246-1-ricardo.martinez@linux.intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wwan/t7xx/t7xx_modem_ops.c
drivers/net/wwan/t7xx/t7xx_pci.c
drivers/net/wwan/t7xx/t7xx_port_proxy.c