summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2026-04-21 15:02:11 +0200
committerMark Brown <broonie@kernel.org>2026-04-22 13:49:16 +0100
commitfa5061daffe841c2577c987c4f3515c45e53b775 (patch)
tree4b1986f88501e5d98795b89cd96ebef88295e89b /drivers/spi
parent443cde0dc59c5d154156ac9f27a7dadef8ebc0c2 (diff)
downloadlwn-fa5061daffe841c2577c987c4f3515c45e53b775.tar.gz
lwn-fa5061daffe841c2577c987c4f3515c45e53b775.zip
spi: orion: 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 <johan@kernel.org> Link: https://patch.msgid.link/20260421130211.1537628-4-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-orion.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index a5ce970ff5a8..64bf215c1804 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -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);