diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2016-11-09 08:46:19 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:20 (GMT) |
commit | 7549850dd647aa7f63c3e99f7d84d2038522f008 (patch) | |
tree | bebc44a436dbf4e1ce8cf4848136b89c467638bf /drivers/crypto/caam/error.c | |
parent | 93eae02473a0e06d5ede8732fca6f43e4bf91c47 (diff) | |
download | linux-7549850dd647aa7f63c3e99f7d84d2038522f008.tar.xz |
crypto: caam - remove unreachable code in report_ccb_status()
ERRID is a 4-bit field.
Since err_id values are in [0..15] and err_id_list array size is 16,
the condition "err_id < ARRAY_SIZE(err_id_list)" is always true.
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/error.c')
-rw-r--r-- | drivers/crypto/caam/error.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c index 33e41ea..79a0cc7 100644 --- a/drivers/crypto/caam/error.c +++ b/drivers/crypto/caam/error.c @@ -146,10 +146,9 @@ static void report_ccb_status(struct device *jrdev, const u32 status, strlen(rng_err_id_list[err_id])) { /* RNG-only error */ err_str = rng_err_id_list[err_id]; - } else if (err_id < ARRAY_SIZE(err_id_list)) + } else { err_str = err_id_list[err_id]; - else - snprintf(err_err_code, sizeof(err_err_code), "%02x", err_id); + } /* * CCB ICV check failures are part of normal operation life; |