From: Johan Hovold Date: Tue, 21 Apr 2026 12:36:15 +0000 (+0200) Subject: spi: cadence: clean up probe return value X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf7b648acd48ae5b9e265727c84b4e0a4a33727b;p=thirdparty%2Fkernel%2Flinux.git spi: cadence: clean up probe return value Drop the redundant initialisation and return explicit zero on successful probe to make the code more readable. Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260421123615.1533617-5-johan@kernel.org Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c index f27586151ca93..d108e89fda220 100644 --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c @@ -635,7 +635,7 @@ static int cdns_target_abort(struct spi_controller *ctlr) */ static int cdns_spi_probe(struct platform_device *pdev) { - int ret = 0, irq; + int ret, irq; struct spi_controller *ctlr; struct cdns_spi *xspi; u32 num_cs; @@ -754,7 +754,7 @@ static int cdns_spi_probe(struct platform_device *pdev) if (!spi_controller_is_target(ctlr)) pm_runtime_put_autosuspend(&pdev->dev); - return ret; + return 0; err_disable_rpm: if (!spi_controller_is_target(ctlr)) {