summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-12-27 17:42:08 +0000
committerMark Brown <broonie@kernel.org>2022-12-27 17:42:08 +0000
commit74ad47c9cecf12e647061107d9f3858d82e0e5c5 (patch)
treecbd9d69a8a55dd4afed165642ecd0d66968bf495
parent1b929c02afd37871d5afb9d498426f83432e71c2 (diff)
parent02228f6aa6a64d588bc31e3267d05ff184d772eb (diff)
regulator: Merge up forgotten fix
I forgot to send this fix during the 6.1 cycle, make sure it gets sent for 6.2.
-rw-r--r--drivers/regulator/da9211-regulator.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c
index e01b32d1fa17..00828f5baa97 100644
--- a/drivers/regulator/da9211-regulator.c
+++ b/drivers/regulator/da9211-regulator.c
@@ -498,6 +498,12 @@ static int da9211_i2c_probe(struct i2c_client *i2c)
chip->chip_irq = i2c->irq;
+ ret = da9211_regulator_init(chip);
+ if (ret < 0) {
+ dev_err(chip->dev, "Failed to initialize regulator: %d\n", ret);
+ return ret;
+ }
+
if (chip->chip_irq != 0) {
ret = devm_request_threaded_irq(chip->dev, chip->chip_irq, NULL,
da9211_irq_handler,
@@ -512,11 +518,6 @@ static int da9211_i2c_probe(struct i2c_client *i2c)
dev_warn(chip->dev, "No IRQ configured\n");
}
- ret = da9211_regulator_init(chip);
-
- if (ret < 0)
- dev_err(chip->dev, "Failed to initialize regulator: %d\n", ret);
-
return ret;
}