提交 47a1f8e8 编写于 作者: M Martin Kaiser 提交者: 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: NPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: NMartin Kaiser <martin@kaiser.cx>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册