Commit 8ffe511b authored by James Cowgill's avatar James Cowgill Committed by Greg Kroah-Hartman
Browse files

hwrng: arm-smccc-trng - fix NO_ENTROPY handling



[ Upstream commit 042b4b16 ]

The SMCCC_RET_TRNG_NO_ENTROPY switch arm is never used because the
NO_ENTROPY return value is negative and negative values are handled
above the switch by immediately returning.

Fix by handling errors using a default arm in the switch.

Fixes: 0888d04b ("hwrng: Add Arm SMCCC TRNG based driver")
Signed-off-by: default avatarJames Cowgill <james.cowgill@blaize.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 27209347
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment