[PATCH] iio: adc: stm32: Fix missing return in booster error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
Fixes: ce30eeb613cb ("iio: adc: stm32: Simplify with dev_err_probe()")
Signed-off-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>

---

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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux