* [PATCH] iio: adc: stm32: Fix missing return in booster error path
@ 2020-09-10 8:52 Krzysztof Kozlowski
2020-09-13 9:45 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-10 8:52 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Maxime Coquelin, Alexandre Torgue,
Krzysztof Kozlowski, Andy Shevchenko, linux-iio, linux-stm32,
linux-arm-kernel, linux-kernel
Cc: Stephen Rothwell, Greg KH
Conversion of error paths to dev_err_probe() dropped one return
statement. The driver will continue to probe if getting booster
regulator fails.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: ce30eeb613cb ("iio: adc: stm32: Simplify with dev_err_probe()")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Commit sha from linux-next.
---
drivers/iio/adc/stm32-adc-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
index 3f27b4817a42..6a0338d33bd8 100644
--- a/drivers/iio/adc/stm32-adc-core.c
+++ b/drivers/iio/adc/stm32-adc-core.c
@@ -595,7 +595,7 @@ static int stm32_adc_core_switches_probe(struct device *dev,
if (IS_ERR(priv->booster)) {
ret = PTR_ERR(priv->booster);
if (ret != -ENODEV)
- dev_err_probe(dev, ret, "can't get booster\n");
+ return dev_err_probe(dev, ret, "can't get booster\n");
priv->booster = NULL;
}
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: adc: stm32: Fix missing return in booster error path
2020-09-10 8:52 [PATCH] iio: adc: stm32: Fix missing return in booster error path Krzysztof Kozlowski
@ 2020-09-13 9:45 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2020-09-13 9:45 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Stephen Rothwell, Lars-Peter Clausen, Alexandre Torgue, linux-iio,
Greg KH, Peter Meerwald-Stadler, linux-kernel, Andy Shevchenko,
Maxime Coquelin, Hartmut Knaack, linux-stm32, linux-arm-kernel
On Thu, 10 Sep 2020 10:52:07 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:
> Conversion of error paths to dev_err_probe() dropped one return
> statement. The driver will continue to probe if getting booster
> regulator fails.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Fixes: ce30eeb613cb ("iio: adc: stm32: Simplify with dev_err_probe()")
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to poke at it.
Thanks,
Jonathan
>
> ---
>
> Commit sha from linux-next.
This is applying to an (in theory) non rebasing tree, so hopefully
that will remain stable!
> ---
> drivers/iio/adc/stm32-adc-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
> index 3f27b4817a42..6a0338d33bd8 100644
> --- a/drivers/iio/adc/stm32-adc-core.c
> +++ b/drivers/iio/adc/stm32-adc-core.c
> @@ -595,7 +595,7 @@ static int stm32_adc_core_switches_probe(struct device *dev,
> if (IS_ERR(priv->booster)) {
> ret = PTR_ERR(priv->booster);
> if (ret != -ENODEV)
> - dev_err_probe(dev, ret, "can't get booster\n");
> + return dev_err_probe(dev, ret, "can't get booster\n");
>
> priv->booster = NULL;
> }
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-13 9:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-10 8:52 [PATCH] iio: adc: stm32: Fix missing return in booster error path Krzysztof Kozlowski
2020-09-13 9:45 ` Jonathan Cameron
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).