From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Linus Walleij <linus.walleij@linaro.org>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Kalle Valo <kvalo@kernel.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)
Date: Sat, 30 Nov 2024 18:54:21 +0300 [thread overview]
Message-ID: <72e9e3bb-e96a-445a-8c31-8505f3a4ffaa@stanley.mountain> (raw)
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@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.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
next reply other threads:[~2024-11-30 15:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-30 15:54 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-13 13:10 Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72e9e3bb-e96a-445a-8c31-8505f3a4ffaa@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=kvalo@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®