Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 124e9deb authored by Benjamin Gaignard's avatar Benjamin Gaignard Committed by Lee Jones
Browse files

mfd: palmas: Use devm_of_platform_populate()



Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.

Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 11ee55d9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -676,7 +676,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
	 * otherwise continue and add devices using mfd helpers.
	 */
	if (node) {
		ret = of_platform_populate(node, NULL, NULL, &i2c->dev);
		ret = devm_of_platform_populate(&i2c->dev);
		if (ret < 0) {
			goto err_irq;
		} else if (pdata->pm_off && !pm_power_off) {