]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
spi: orion: clean up probe return value
authorJohan Hovold <johan@kernel.org>
Tue, 21 Apr 2026 13:02:11 +0000 (15:02 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 22 Apr 2026 12:49:16 +0000 (13:49 +0100)
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/20260421130211.1537628-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-orion.c

index a5ce970ff5a8c329a379fbe89ad7f120deae6458..64bf215c180475f086b5b99a6e49d350c648c227 100644 (file)
@@ -648,8 +648,8 @@ static int orion_spi_probe(struct platform_device *pdev)
        struct orion_spi *spi;
        struct resource *r;
        unsigned long tclk_hz;
-       int status = 0;
        struct device_node *np;
+       int status;
 
        host = spi_alloc_host(&pdev->dev, sizeof(*spi));
        if (host == NULL) {
@@ -787,7 +787,7 @@ static int orion_spi_probe(struct platform_device *pdev)
 
        pm_runtime_put_autosuspend(&pdev->dev);
 
-       return status;
+       return 0;
 
 out_rel_pm:
        pm_runtime_disable(&pdev->dev);