mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 07:06:40 +07:00
ALSA: x86: Fix possible stale interrupt calls
Registering the irq handler at the too early place may cause a system stall because the irq handler may be triggered before the other initializations. Move the irq handler registration to the later point. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
437af8f294
commit
033e925f68
@ -400,16 +400,6 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
|
|||||||
return -EACCES;
|
return -EACCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* setup interrupt handler */
|
|
||||||
ret = request_irq(irq, display_pipe_interrupt_handler,
|
|
||||||
0,
|
|
||||||
pdev->name,
|
|
||||||
NULL);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(&hlpe_pdev->dev, "request_irq failed\n");
|
|
||||||
goto error_irq;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* alloc and save context */
|
/* alloc and save context */
|
||||||
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
|
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
@ -438,11 +428,21 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
|
|||||||
if (pdata == NULL) {
|
if (pdata == NULL) {
|
||||||
dev_err(&hlpe_pdev->dev, "%s: quit: pdata not allocated by i915!!\n", __func__);
|
dev_err(&hlpe_pdev->dev, "%s: quit: pdata not allocated by i915!!\n", __func__);
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto error_probe;
|
goto error_irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_set_drvdata(pdev, ctx);
|
platform_set_drvdata(pdev, ctx);
|
||||||
|
|
||||||
|
/* setup interrupt handler */
|
||||||
|
ret = request_irq(irq, display_pipe_interrupt_handler,
|
||||||
|
0,
|
||||||
|
pdev->name,
|
||||||
|
NULL);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_err(&hlpe_pdev->dev, "request_irq failed\n");
|
||||||
|
goto error_irq;
|
||||||
|
}
|
||||||
|
|
||||||
ret = hdmi_audio_probe(pdev, &ctx->had);
|
ret = hdmi_audio_probe(pdev, &ctx->had);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error_probe;
|
goto error_probe;
|
||||||
@ -469,10 +469,10 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error_probe:
|
error_probe:
|
||||||
kfree(ctx);
|
|
||||||
error_ctx:
|
|
||||||
free_irq(irq, NULL);
|
free_irq(irq, NULL);
|
||||||
error_irq:
|
error_irq:
|
||||||
|
kfree(ctx);
|
||||||
|
error_ctx:
|
||||||
iounmap(mmio_start);
|
iounmap(mmio_start);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user