spi: omap2-mcspi: clean up error labels

Clean up the error labels by adding a common prefix and naming them
after what they do.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260430120200.249323-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Johan Hovold 2026-04-30 14:01:59 +02:00 committed by Mark Brown
parent caf2fd997b
commit 186fda6ee1
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1553,26 +1553,27 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
status = omap2_mcspi_request_dma(mcspi,
&mcspi->dma_channels[i]);
if (status == -EPROBE_DEFER)
goto free_ctlr;
goto err_release_dma;
}
status = platform_get_irq(pdev, 0);
if (status < 0)
goto free_ctlr;
goto err_release_dma;
init_completion(&mcspi->txdone);
status = devm_request_irq(&pdev->dev, status,
omap2_mcspi_irq_handler, 0, pdev->name,
mcspi);
if (status) {
dev_err(&pdev->dev, "Cannot request IRQ");
goto free_ctlr;
goto err_release_dma;
}
mcspi->ref_clk = devm_clk_get_optional_enabled(&pdev->dev, NULL);
if (IS_ERR(mcspi->ref_clk)) {
status = PTR_ERR(mcspi->ref_clk);
dev_err_probe(&pdev->dev, status, "Failed to get ref_clk");
goto free_ctlr;
goto err_release_dma;
}
if (mcspi->ref_clk)
mcspi->ref_clk_hz = clk_get_rate(mcspi->ref_clk);
@ -1587,19 +1588,19 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
status = omap2_mcspi_controller_setup(mcspi);
if (status < 0)
goto disable_pm;
goto err_disable_rpm;
status = spi_register_controller(ctlr);
if (status < 0)
goto disable_pm;
goto err_disable_rpm;
return status;
disable_pm:
err_disable_rpm:
pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
free_ctlr:
err_release_dma:
omap2_mcspi_release_dma(ctlr);
return status;