From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Herbert Xu <herbert@gondor.apana.org.au>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: drivers/crypto/ti/dthev2-common.c:44 dthe_get_dev() warn: can 'dev_data' even be NULL?
Date: Thu, 18 Dec 2025 10:19:32 +0300 [thread overview]
Message-ID: <202512181322.nBkDZbGb-lkp@intel.com> (raw)
Hi Herbert,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ea1013c1539270e372fc99854bc6e4d94eaeff66
commit: 35c5097f737a164b3afe23d07698db95061f0db8 crypto: ti - Enable compile testing for dthev2
config: s390-randconfig-r071-20251217 (https://download.01.org/0day-ci/archive/20251218/202512181322.nBkDZbGb-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.3.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/202512181322.nBkDZbGb-lkp@intel.com/
smatch warnings:
drivers/crypto/ti/dthev2-common.c:44 dthe_get_dev() warn: can 'dev_data' even be NULL?
vim +/dev_data +44 drivers/crypto/ti/dthev2-common.c
52f641bc63a4665 T Pratham 2025-08-20 35 struct dthe_data *dthe_get_dev(struct dthe_tfm_ctx *ctx)
52f641bc63a4665 T Pratham 2025-08-20 36 {
52f641bc63a4665 T Pratham 2025-08-20 37 struct dthe_data *dev_data;
52f641bc63a4665 T Pratham 2025-08-20 38
52f641bc63a4665 T Pratham 2025-08-20 39 if (ctx->dev_data)
52f641bc63a4665 T Pratham 2025-08-20 40 return ctx->dev_data;
52f641bc63a4665 T Pratham 2025-08-20 41
52f641bc63a4665 T Pratham 2025-08-20 42 spin_lock_bh(&dthe_dev_list.lock);
52f641bc63a4665 T Pratham 2025-08-20 43 dev_data = list_first_entry(&dthe_dev_list.dev_list, struct dthe_data, list);
52f641bc63a4665 T Pratham 2025-08-20 @44 if (dev_data)
52f641bc63a4665 T Pratham 2025-08-20 45 list_move_tail(&dev_data->list, &dthe_dev_list.dev_list);
dev_data can't be NULL. Probably this should use list_first_entry_or_null()
52f641bc63a4665 T Pratham 2025-08-20 46 spin_unlock_bh(&dthe_dev_list.lock);
52f641bc63a4665 T Pratham 2025-08-20 47
52f641bc63a4665 T Pratham 2025-08-20 48 return dev_data;
52f641bc63a4665 T Pratham 2025-08-20 49 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-12-18 7:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 7:19 Dan Carpenter [this message]
2026-06-11 11:19 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=202512181322.nBkDZbGb-lkp@intel.com \
--to=dan.carpenter@linaro.org \
--cc=herbert@gondor.apana.org.au \
--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®