public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: core: Fix default return value for _get()
@ 2013-09-20 11:24 Mark Brown
  2013-09-20 11:31 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2013-09-20 11:24 UTC (permalink / raw)
  To: Thierry Reding, Liam Girdwood; +Cc: linux-kernel, Mark Brown

From: Mark Brown <broonie@linaro.org>

Now that we are defaulting to providing dummy regulators fix the logic
for substituting a dummy by making the default return code -EPROBE_DEFER.

Reported-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
---

Not tested at all.

 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 4eefcc3..353779b 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1231,7 +1231,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
 	struct regulator_dev *rdev;
 	struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
 	const char *devname = NULL;
-	int ret = 0;
+	int ret = -EPROBE_DEFER;
 
 	if (id == NULL) {
 		pr_err("get() with no identifier\n");
-- 
1.8.4.rc3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: core: Fix default return value for _get()
  2013-09-20 11:24 [PATCH] regulator: core: Fix default return value for _get() Mark Brown
@ 2013-09-20 11:31 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2013-09-20 11:31 UTC (permalink / raw)
  To: Mark Brown; +Cc: Thierry Reding, Liam Girdwood, linux-kernel, Mark Brown

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

On Fri, Sep 20, 2013 at 12:24:49PM +0100, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> Now that we are defaulting to providing dummy regulators fix the logic
> for substituting a dummy by making the default return code -EPROBE_DEFER.
> 
> Reported-by: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
> 
> Not tested at all.
> 
>  drivers/regulator/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-20 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-20 11:24 [PATCH] regulator: core: Fix default return value for _get() Mark Brown
2013-09-20 11:31 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox