diff options
author | Marcin Niestroj <m.niestroj@grinn-global.com> | 2018-09-03 13:23:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-09-04 10:03:49 +0200 |
commit | c4c5a82220f7fa528eebddf56f317fa51c930c76 (patch) | |
tree | 111b51f0dbcaa0ee9237baf5384d8a1b18f813af /drivers/crypto | |
parent | ecf98a0cf3ce3fc12d210e629837a64588f39e79 (diff) | |
download | barebox-c4c5a82220f7fa528eebddf56f317fa51c930c76.tar.gz barebox-c4c5a82220f7fa528eebddf56f317fa51c930c76.tar.xz |
crypto: caam - remove unreachable code in report_ccb_status()
Pick commit 9305dff7ab8b5e1aef2c4c5c733ce7e1dc345433 from Linux
upstream.
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>
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/crypto')
-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 9c875375df..766875b58b 100644 --- a/drivers/crypto/caam/error.c +++ b/drivers/crypto/caam/error.c @@ -150,10 +150,9 @@ static void report_ccb_status(struct device_d *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; |