]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
spi: cadence: clean up probe return value
authorJohan Hovold <johan@kernel.org>
Tue, 21 Apr 2026 12:36:15 +0000 (14:36 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 26 Apr 2026 23:25:50 +0000 (08:25 +0900)
Drop the redundant initialisation and return explicit zero on successful
probe to make the code more readable.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421123615.1533617-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence.c

index f27586151ca93e1f26cb6a2510499da94dfcae27..d108e89fda220156cef976fc1a3254b9dc0366f0 100644 (file)
@@ -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)) {