From: Neal Liu Date: Wed, 1 Mar 2023 03:32:05 +0000 (+0800) Subject: crypto: aspeed - fix uninitialized symbol 'idx' warning X-Git-Tag: v6.6.7~2762^2~93 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2ca29501c2b60934094fb59113a1c44f56f66f4;p=platform%2Fkernel%2Flinux-starfive.git crypto: aspeed - fix uninitialized symbol 'idx' warning 'idx' is not initialized if it's not EXP_MODE nor MOD_MODE. Use "else" instead to fix it. Signed-off-by: Neal Liu Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302261052.CVFRyq6F-lkp@intel.com/ Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/aspeed/aspeed-acry.c b/drivers/crypto/aspeed/aspeed-acry.c index 565059c1..470122c 100644 --- a/drivers/crypto/aspeed/aspeed-acry.c +++ b/drivers/crypto/aspeed/aspeed-acry.c @@ -289,7 +289,7 @@ static int aspeed_acry_rsa_ctx_copy(struct aspeed_acry_dev *acry_dev, void *buf, if (mode == ASPEED_RSA_EXP_MODE) idx = acry_dev->exp_dw_mapping[j - 1]; - else if (mode == ASPEED_RSA_MOD_MODE) + else /* mode == ASPEED_RSA_MOD_MODE */ idx = acry_dev->mod_dw_mapping[j - 1]; dw_buf[idx] = cpu_to_le32(data);