[PATCH 4/4] spi: cadence: clean up probe return value
From: Johan Hovold
Date: Tue Apr 21 2026 - 08:40:07 EST
Drop the redundant initialisation and return explicit zero on successful
probe to make the code more readable.
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
---
drivers/spi/spi-cadence.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index f27586151ca9..d108e89fda22 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)) {
--
2.52.0