oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jia Jie Ho <jiajie.ho@starfivetech.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Huan Feng <huan.feng@starfivetech.com>
Subject: drivers/crypto/starfive/jh7110-rsa.c:66:2-17: WARNING: NULL check before some freeing functions is not needed.
Date: Thu, 30 Nov 2023 17:58:08 +0800	[thread overview]
Message-ID: <202311301702.LxswfETY-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3b47bc037bd44f142ac09848e8d3ecccc726be99
commit: 445a4aaf5842073e4130b1d6dbe3785284d9615f crypto: starfive - Add RSA algo support
date:   5 months ago
config: arm64-randconfig-r061-20231130 (https://download.01.org/0day-ci/archive/20231130/202311301702.LxswfETY-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231130/202311301702.LxswfETY-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311301702.LxswfETY-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/crypto/starfive/jh7110-rsa.c:66:2-17: WARNING: NULL check before some freeing functions is not needed.
   drivers/crypto/starfive/jh7110-rsa.c:68:2-17: WARNING: NULL check before some freeing functions is not needed.
   drivers/crypto/starfive/jh7110-rsa.c:70:2-17: WARNING: NULL check before some freeing functions is not needed.

vim +66 drivers/crypto/starfive/jh7110-rsa.c

    62	
    63	static void starfive_rsa_free_key(struct starfive_rsa_key *key)
    64	{
    65		if (key->d)
  > 66			kfree_sensitive(key->d);
    67		if (key->e)
    68			kfree_sensitive(key->e);
    69		if (key->n)
    70			kfree_sensitive(key->n);
    71		memset(key, 0, sizeof(*key));
    72	}
    73	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-11-30  9:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202311301702.LxswfETY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=huan.feng@starfivetech.com \
    --cc=jiajie.ho@starfivetech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@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;
as well as URLs for NNTP newsgroup(s).