regulator: Merge up forgotten fix

I forgot to send this fix during the 6.1 cycle, make sure it gets sent
for 6.2.
This commit is contained in:
Mark Brown 2022-12-27 17:42:08 +00:00
commit 74ad47c9ce
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View 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;
}