Commit 47a1f8e8 authored by Martin Kaiser's avatar Martin Kaiser Committed by Herbert Xu

hwrng: imx-rngc - fix an error path

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: 1d544944 ("hwrng: mx-rngc - add a driver for Freescale RNGC")
Reviewed-by: default avatarPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ace74b62
......@@ -105,8 +105,10 @@ static int imx_rngc_self_test(struct imx_rngc *rngc)
return -ETIMEDOUT;
}
if (rngc->err_reg != 0)
if (rngc->err_reg != 0) {
imx_rngc_irq_mask_clear(rngc);
return -EIO;
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment