ASoC: mediatek: mt8173: Fix irq error path
commitf9c058d14f
upstream. After reordering the irq probe, the error path was not properly done. Lets fix it. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Cc: stable@kernel.org Fixes:4cbb264d4e
("ASoC: mediatek: mt8173: Enable IRQ when pdata is ready") Signed-off-by: Ricardo Ribalda Delgado <ribalda@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230612-mt8173-fixup-v2-2-432aa99ce24d@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
6e7f6b4b5c
Коммит
5f35f98e56
|
@ -1072,6 +1072,10 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
|
|||
|
||||
afe->dev = &pdev->dev;
|
||||
|
||||
irq_id = platform_get_irq(pdev, 0);
|
||||
if (irq_id <= 0)
|
||||
return irq_id < 0 ? irq_id : -ENXIO;
|
||||
|
||||
afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(afe->base_addr))
|
||||
return PTR_ERR(afe->base_addr);
|
||||
|
@ -1177,14 +1181,11 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto err_cleanup_components;
|
||||
|
||||
irq_id = platform_get_irq(pdev, 0);
|
||||
if (irq_id <= 0)
|
||||
return irq_id < 0 ? irq_id : -ENXIO;
|
||||
ret = devm_request_irq(afe->dev, irq_id, mt8173_afe_irq_handler,
|
||||
0, "Afe_ISR_Handle", (void *)afe);
|
||||
if (ret) {
|
||||
dev_err(afe->dev, "could not request_irq\n");
|
||||
goto err_pm_disable;
|
||||
goto err_cleanup_components;
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, "MT8173 AFE driver initialized.\n");
|
||||
|
|
Загрузка…
Ссылка в новой задаче