* [jarkko-tpmdd:tpm2key-v8 10/11] crypto/asymmetric_keys/tpm2_key_rsa.c:636:10: warning: variable 'ret' is uninitialized when used here
@ 2024-09-11 7:55 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-11 7:55 UTC (permalink / raw)
To: Jarkko Sakkinen; +Cc: llvm, oe-kbuild-all, James Prestwood
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tpm2key-v8
head: 79e909153c0a5ac21c2c5c0d4eac9229b3408178
commit: 7d90c72ea84705971e66e2023d388c2d9958220d [10/11] keys: asymmetric: Add tpm2_key_rsa
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240911/202409111527.uF380T7Y-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240911/202409111527.uF380T7Y-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/202409111527.uF380T7Y-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> crypto/asymmetric_keys/tpm2_key_rsa.c:636:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
636 | return ret;
| ^~~
crypto/asymmetric_keys/tpm2_key_rsa.c:632:9: note: initialize the variable 'ret' to silence this warning
632 | int ret;
| ^
| = 0
1 warning generated.
vim +/ret +636 crypto/asymmetric_keys/tpm2_key_rsa.c
625
626 /*
627 * Attempt to parse a data blob for a key as a TPM private key blob.
628 */
629 static int tpm2_key_rsa_preparse(struct key_preparsed_payload *prep)
630 {
631 struct tpm2_key *key;
632 int ret;
633
634 key = tpm2_key_decode(prep->data, prep->datalen);
635 if (IS_ERR(key))
> 636 return ret;
637
638 if (key->oid != OID_TPMLoadableKey) {
639 kfree(key);
640 return -EBADMSG;
641 }
642
643 ret = __tpm2_key_rsa_preparse(key);
644 if (ret < 0) {
645 kfree(key);
646 return ret;
647 }
648
649 prep->payload.data[asym_subtype] = &tpm2_key_rsa_subtype;
650 prep->payload.data[asym_key_ids] = NULL;
651 prep->payload.data[asym_crypto] = key;
652 prep->payload.data[asym_auth] = NULL;
653 prep->quotalen = 100;
654
655 return 0;
656 }
657
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-11 7:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 7:55 [jarkko-tpmdd:tpm2key-v8 10/11] crypto/asymmetric_keys/tpm2_key_rsa.c:636:10: warning: variable 'ret' is uninitialized when used here kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox