]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: atmel-sha204a - fail on hwrng registration error in probe path
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 17 May 2026 16:27:40 +0000 (18:27 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 May 2026 12:25:30 +0000 (20:25 +0800)
commit49e05bb00f2e8168695f7af4d694c39e1423e8a2
tree212413966d6958273167282e6b224f51ebb4055d
parentd58b4a09d7f06750a706b70d068f5a678dad8233
crypto: atmel-sha204a - fail on hwrng registration error in probe path

Commit 13909a0c8897 ("crypto: atmel-sha204a - provide the otp content")
overwrote the hwrng registration return value when creating the sysfs
group, which allowed atmel_sha204a_probe() to succeed even if
devm_hwrng_register() failed.

Return immediately when devm_hwrng_register() fails, and report both
hwrng and sysfs registration errors with dev_err(). Adjust the sysfs
error log message for consistency.

Fixes: 13909a0c8897 ("crypto: atmel-sha204a - provide the otp content")
Cc: stable@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-sha204a.c