summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2016-11-09 10:46:19 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2016-11-13 17:45:12 +0800
commit9305dff7ab8b5e1aef2c4c5c733ce7e1dc345433 (patch)
tree7ae794af85f3c3eee2e27efe180b6bbd63083b83
parent4ca7c7d8fea1ffdc36df33578c1e68d0d6367b0c (diff)
downloadlinux-9305dff7ab8b5e1aef2c4c5c733ce7e1dc345433.tar.bz2
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>
-rw-r--r--drivers/crypto/caam/error.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c
index 33e41ea83fcc..79a0cc70717f 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;