[<prev] [next>] [day] [month] [year] [list]
Message-ID: <72e9e3bb-e96a-445a-8c31-8505f3a4ffaa@stanley.mountain>
Date: Sat, 30 Nov 2024 18:54:21 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev, Linus Walleij <linus.walleij@...aro.org>
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, Kalle Valo <kvalo@...nel.org>
Subject: drivers/net/wireless/st/cw1200/cw1200_spi.c:440
cw1200_spi_disconnect() error: we previously assumed 'self' could be null
(see line 433)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aaf20f870da056752f6386693cc0d8e25421ef35
commit: 2719a9e7156c4b3983b43db467c1ff96801bda99 wifi: cw1200: Convert to GPIO descriptors
config: riscv-randconfig-r073-20241111 (https://download.01.org/0day-ci/archive/20241127/202411271742.Xa7CNVh1-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 14.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202411271742.Xa7CNVh1-lkp@intel.com/
smatch warnings:
drivers/net/wireless/st/cw1200/cw1200_spi.c:440 cw1200_spi_disconnect() error: we previously assumed 'self' could be null (see line 433)
vim +/self +440 drivers/net/wireless/st/cw1200/cw1200_spi.c
a0386bba70934d drivers/net/wireless/st/cw1200/cw1200_spi.c Uwe Kleine-König 2022-01-23 429 static void cw1200_spi_disconnect(struct spi_device *func)
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 430 {
911373cca1b455 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-06-01 431 struct hwbus_priv *self = spi_get_drvdata(func);
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 432
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 @433 if (self) {
Check for NULL
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 434 cw1200_spi_irq_unsubscribe(self);
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 435 if (self->core) {
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 436 cw1200_core_release(self->core);
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 437 self->core = NULL;
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 438 }
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 439 }
2719a9e7156c4b drivers/net/wireless/st/cw1200/cw1200_spi.c Linus Walleij 2024-01-31 @440 cw1200_spi_off(self, dev_get_platdata(&func->dev));
^^^^
Unchecked dereference
a910e4a94f6923 drivers/net/wireless/cw1200/cw1200_spi.c Solomon Peachy 2013-05-24 441 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists