Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9305dff7 authored by Horia Geantă's avatar Horia Geantă Committed by Herbert Xu
Browse files

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: default avatarHoria Geantă <horia.geanta@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4ca7c7d8
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -146,10 +146,9 @@ static void report_ccb_status(struct device *jrdev, const u32 status,
	    strlen(rng_err_id_list[err_id])) {
	    strlen(rng_err_id_list[err_id])) {
		/* RNG-only error */
		/* RNG-only error */
		err_str = rng_err_id_list[err_id];
		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];
		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;
	 * CCB ICV check failures are part of normal operation life;