mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
commit 649b50a82f09fa44c2f7a65618e4584072145ab7 upstream.
After moving tmio_mmc_host_probe down, error handling has to be
adjusted.
Fixes: 74f45de394
("mmc: renesas_sdhi: register irqs before registering controller")
Reviewed-by: Ihar Salauyou <salauyou.ihar@gmail.com>
Signed-off-by: Ruslan Piasetskyi <ruslan.piasetskyi@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250326220638.460083-1-ruslan.piasetskyi@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4d1a2d1363
commit
3aa4aff158
@@ -1107,26 +1107,26 @@ int renesas_sdhi_probe(struct platform_device *pdev,
|
||||
num_irqs = platform_irq_count(pdev);
|
||||
if (num_irqs < 0) {
|
||||
ret = num_irqs;
|
||||
goto eirq;
|
||||
goto edisclk;
|
||||
}
|
||||
|
||||
/* There must be at least one IRQ source */
|
||||
if (!num_irqs) {
|
||||
ret = -ENXIO;
|
||||
goto eirq;
|
||||
goto edisclk;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_irqs; i++) {
|
||||
irq = platform_get_irq(pdev, i);
|
||||
if (irq < 0) {
|
||||
ret = irq;
|
||||
goto eirq;
|
||||
goto edisclk;
|
||||
}
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
|
||||
dev_name(&pdev->dev), host);
|
||||
if (ret)
|
||||
goto eirq;
|
||||
goto edisclk;
|
||||
}
|
||||
|
||||
ret = tmio_mmc_host_probe(host);
|
||||
@@ -1138,8 +1138,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
|
||||
|
||||
return ret;
|
||||
|
||||
eirq:
|
||||
tmio_mmc_host_remove(host);
|
||||
edisclk:
|
||||
renesas_sdhi_clk_disable(host);
|
||||
efree:
|
||||
|
Reference in New Issue
Block a user