regulator: Merge up forgotten fix
authorMark Brown <broonie@kernel.org>
Tue, 27 Dec 2022 17:42:08 +0000 (17:42 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 27 Dec 2022 17:42:08 +0000 (17:42 +0000)
I forgot to send this fix during the 6.1 cycle, make sure it gets sent
for 6.2.

drivers/regulator/da9211-regulator.c

index e01b32d1fa17d428ded0a718a3dea03a1096b3f9..00828f5baa972a3d8bdf5f37583458fddd447009 100644 (file)
@@ -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;
 }