From: Schrempf Frieder <frieder.schrempf@kontron.de>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>,
Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Robin Gong <yibin.gong@nxp.com>, Axel Lin <axel.lin@ingics.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: pca9450: Fix return value when failing to get sd-vsel GPIO
Date: Mon, 22 Feb 2021 16:08:04 +0100 [thread overview]
Message-ID: <20210222150809.208942-1-frieder.schrempf@kontron.de> (raw)
From: Frieder Schrempf <frieder.schrempf@kontron.de>
This fixes the return value of pca9450_i2c_probe() to use the correct
error code when getting the sd-vsel GPIO fails.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
drivers/regulator/pca9450-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index d38109cc3a01..2f7ee212cb8c 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -822,7 +822,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c,
if (IS_ERR(pca9450->sd_vsel_gpio)) {
dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n");
- return ret;
+ return PTR_ERR(pca9450->sd_vsel_gpio);
}
dev_info(&i2c->dev, "%s probed.\n",
--
2.25.1
next reply other threads:[~2021-02-22 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-22 15:08 Schrempf Frieder [this message]
2021-02-22 15:16 ` [PATCH] regulator: pca9450: Fix return value when failing to get sd-vsel GPIO Frieder Schrempf
2021-02-24 16:58 ` 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=20210222150809.208942-1-frieder.schrempf@kontron.de \
--to=frieder.schrempf@kontron.de \
--cc=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rikard.falkeborn@gmail.com \
--cc=yibin.gong@nxp.com \
/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;
as well as URLs for NNTP newsgroup(s).