From: Johan Hovold <johan@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Johan Hovold <johan@kernel.org>
Subject: [PATCH v2 3/3] spi: omap2-mcspi: clean up probe return value
Date: Thu, 30 Apr 2026 14:02:00 +0200 [thread overview]
Message-ID: <20260430120200.249323-4-johan@kernel.org> (raw)
In-Reply-To: <20260430120200.249323-1-johan@kernel.org>
Return explicit zero on successful probe to clearly separate the success
and error paths and make the code more readable.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/spi/spi-omap2-mcspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 59ebdf7edbd2..d53f98aa0aac 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1594,7 +1594,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
if (status < 0)
goto err_disable_rpm;
- return status;
+ return 0;
err_disable_rpm:
pm_runtime_dont_use_autosuspend(&pdev->dev);
--
2.53.0
next prev parent reply other threads:[~2026-04-30 12:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 12:01 [PATCH v2 0/3] spi: omap2-mcspi: switch to managed controller allocation Johan Hovold
2026-04-30 12:01 ` [PATCH v2 1/3] " Johan Hovold
2026-04-30 12:01 ` [PATCH v2 2/3] spi: omap2-mcspi: clean up error labels Johan Hovold
2026-04-30 12:02 ` Johan Hovold [this message]
2026-05-04 13:12 ` [PATCH v2 0/3] spi: omap2-mcspi: switch to managed controller allocation Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260430120200.249323-4-johan@kernel.org \
--to=johan@kernel.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox