diff options
| author | Neal Liu <[email protected]> | 2023-03-01 11:32:05 +0800 |
|---|---|---|
| committer | Herbert Xu <[email protected]> | 2023-03-14 17:06:45 +0800 |
| commit | b2ca29501c2b60934094fb59113a1c44f56f66f4 (patch) | |
| tree | 731d2339c4411f6701de8bb86f99e25d1d278fb2 | |
| parent | 06e39357c36b0d3cc2779d08ed04cb389eaa22ba (diff) | |
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 <[email protected]>
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]/
Signed-off-by: Herbert Xu <[email protected]>
| -rw-r--r-- | drivers/crypto/aspeed/aspeed-acry.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/aspeed/aspeed-acry.c b/drivers/crypto/aspeed/aspeed-acry.c index 565059c1ddbf..470122c87fea 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); |