All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Dan Carpenter" <dan.carpenter@linaro.org>, <oe-kbuild@lists.linux.dev>
Cc: <lkp@intel.com>, <oe-kbuild-all@lists.linux.dev>,
	"James Prestwood" <prestwoj@gmail.com>
Subject: Re: [jarkko-tpmdd:tpm2key-v7 8/9] crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret'.
Date: Wed, 29 May 2024 18:42:49 +0300	[thread overview]
Message-ID: <D1M8RQ9YRARD.25KABQOVVVG7J@kernel.org> (raw)
In-Reply-To: <cbae0ed0-e0a6-41ba-9671-a9f48e8f07f3@moroto.mountain>

On Wed May 29, 2024 at 5:36 PM EEST, Dan Carpenter wrote:
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tpm2key-v7
> head:   892305fec7841bf841a9c19e01c999c5f4b4e831
> commit: 4970b8d723c3af732b21a8bf7c1eebfb03792457 [8/9] keys: asymmetric: Add tpm2_key_rsa
> config: alpha-randconfig-r081-20240529 (https://download.01.org/0day-ci/archive/20240529/202405291528.FxUKVyP2-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 13.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/202405291528.FxUKVyP2-lkp@intel.com/
>
> smatch warnings:
> crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret'.
>
> vim +/ret +636 crypto/asymmetric_keys/tpm2_key_rsa.c
>
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  629  static int tpm2_key_rsa_preparse(struct key_preparsed_payload *prep)
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  630  {
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  631  	struct tpm2_key *key;
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  632  	int ret;
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  633  
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  634  	key = tpm2_key_decode(prep->data, prep->datalen);
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  635  	if (IS_ERR(key))
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26 @636  		return ret;
>                                                                 ^^^^^^^^^^
> Same.  return PTR_ERR(key);
>
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  637  
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  638  	if (key->oid != OID_TPMLoadableKey) {
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  639  		kfree(key);
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  640  		return -EBADMSG;
> 4970b8d723c3af Jarkko Sakkinen 2024-05-26  641  	}

Thanks for spotting this!

BR, Jarkko

  reply	other threads:[~2024-05-29 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 14:36 [jarkko-tpmdd:tpm2key-v7 8/9] crypto/asymmetric_keys/tpm2_key_rsa.c:636 tpm2_key_rsa_preparse() error: uninitialized symbol 'ret' Dan Carpenter
2024-05-29 15:42 ` Jarkko Sakkinen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-29  7:12 kernel test robot

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=D1M8RQ9YRARD.25KABQOVVVG7J@kernel.org \
    --to=jarkko@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=prestwoj@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.