hwrng: imx-rngc - fix an error path
authorMartin Kaiser <martin@kaiser.cx>
Thu, 5 Mar 2020 20:58:20 +0000 (21:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 08:48:08 +0000 (10:48 +0200)
commit41a0cfa05c053002f6a8e2d41c5dc3e21da754b6
tree8317721bee29c90571cef34b0182028fba547d45
parentdfa210cf9f949a2c8a0686a3095093419eea2e84
hwrng: imx-rngc - fix an error path

commit 47a1f8e8b3637ff5f7806587883d7d94068d9ee8 upstream.

Make sure that the rngc interrupt is masked if the rngc self test fails.
Self test failure means that probe fails as well. Interrupts should be
masked in this case, regardless of the error.

Cc: stable@vger.kernel.org
Fixes: 1d5449445bd0 ("hwrng: mx-rngc - add a driver for Freescale RNGC")
Reviewed-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/hw_random/imx-rngc.c