Skip to contentSkip to conversation

iio: adc: stm32: Fix missing return in booster error path

PATCH In review Krzysztof Kozlowski 2 participants 2 messages Sep 10, 2020 – Sep 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: adc: stm32: Fix missing return in booster error path

Conversion of error paths to dev_err_probe() dropped one return statement. The driver will continue to probe if getting booster regulator fails.

Fixes ce30eeb613cb ("iio: adc: stm32: Simplify with dev_err_probe()")

---

Commit sha from linux-next.

---
 drivers/iio/adc/stm32-adc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/stm32-adc-core.c +1 -1
index 3f27b4817a42..6a0338d33bd8 100644
@@ -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;
 		}
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 7 lines · On Thu, 10 Sep 2020 10:52:07 +0200 Krzysztof Kozlowski <[email protected]> wrote:

Conversion of error paths to dev_err_probe() dropped one return statement. The driver will continue to probe if getting booster regulator fails.

Fixes ce30eeb613cb ("iio: adc: stm32: Simplify with dev_err_probe()")

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke at it.

Thanks,

Jonathan

Quoted 4 lines

---

Commit sha from linux-next.

This is applying to an (in theory) non rebasing tree, so hopefully that will remain stable!

Quoted 17 lines
---
 drivers/iio/adc/stm32-adc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/stm32-adc-core.c +1 -1
index 3f27b4817a42..6a0338d33bd8 100644
@@ -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;
 		}