summaryrefslogtreecommitdiffstats
path: root/drivers/net/wwan/t7xx/t7xx_pci.c
diff options
context:
space:
mode:
authorRicardo Martinez <ricardo.martinez@linux.intel.com>2022-05-18 12:55:29 -0700
committerJakub Kicinski <kuba@kernel.org>2022-05-19 18:37:09 -0700
commit86afd5a0e78eb9b84b158b33d85f711c5f748fd1 (patch)
tree9bb5bdf07de561070ad8778db47b87534e13f0db /drivers/net/wwan/t7xx/t7xx_pci.c
parentcb89580ed8965fe317025d1da1a05b6b5aae1646 (diff)
downloadlinux-86afd5a0e78eb9b84b158b33d85f711c5f748fd1.tar.gz
linux-86afd5a0e78eb9b84b158b33d85f711c5f748fd1.tar.bz2
linux-86afd5a0e78eb9b84b158b33d85f711c5f748fd1.zip
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>
Diffstat (limited to 'drivers/net/wwan/t7xx/t7xx_pci.c')
-rw-r--r--drivers/net/wwan/t7xx/t7xx_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wwan/t7xx/t7xx_pci.c b/drivers/net/wwan/t7xx/t7xx_pci.c
index 5f1bb8d6afb6..871f2a27a398 100644
--- a/drivers/net/wwan/t7xx/t7xx_pci.c
+++ b/drivers/net/wwan/t7xx/t7xx_pci.c
@@ -568,7 +568,7 @@ static const struct dev_pm_ops t7xx_pci_pm_ops = {
static int t7xx_request_irq(struct pci_dev *pdev)
{
struct t7xx_pci_dev *t7xx_dev;
- int ret, i;
+ int ret = 0, i;
t7xx_dev = pci_get_drvdata(pdev);