mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
hwrng: imx-rngc - Moving IRQ handler registering after imx_rngc_irq_mask_clear()
[ Upstream commit10a2199caf
] Issue: While servicing interrupt, if the IRQ happens to be because of a SEED_DONE due to a previous boot stage, you end up completing the completion prematurely, hence causing kernel to crash while booting. Fix: Moving IRQ handler registering after imx_rngc_irq_mask_clear() Fixes:1d5449445b
(hwrng: mx-rngc - add a driver for Freescale RNGC) Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d88b88514e
commit
ab2485eb5d
1 changed files with 7 additions and 7 deletions
|
@ -272,13 +272,6 @@ static int imx_rngc_probe(struct platform_device *pdev)
|
|||
goto err;
|
||||
}
|
||||
|
||||
ret = devm_request_irq(&pdev->dev,
|
||||
irq, imx_rngc_irq, 0, pdev->name, (void *)rngc);
|
||||
if (ret) {
|
||||
dev_err(rngc->dev, "Can't get interrupt working.\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
init_completion(&rngc->rng_op_done);
|
||||
|
||||
rngc->rng.name = pdev->name;
|
||||
|
@ -292,6 +285,13 @@ static int imx_rngc_probe(struct platform_device *pdev)
|
|||
|
||||
imx_rngc_irq_mask_clear(rngc);
|
||||
|
||||
ret = devm_request_irq(&pdev->dev,
|
||||
irq, imx_rngc_irq, 0, pdev->name, (void *)rngc);
|
||||
if (ret) {
|
||||
dev_err(rngc->dev, "Can't get interrupt working.\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (self_test) {
|
||||
ret = imx_rngc_self_test(rngc);
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in a new issue