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

Commit 42e8c811 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

regulator: ab8500: Unregister ab8500-ext regulators in probe() failure path

parent 3480c0ca
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3172,9 +3172,12 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
	for (i = 0; i < abx500_regulator.info_size; i++) {
		err = ab8500_regulator_register(pdev, &pdata->regulator[i],
						i, NULL);
		if (err < 0)
		if (err < 0) {
			if (!is_ab8505(ab8500))
				ab8500_ext_regulator_exit(pdev);
			return err;
		}
	}

	return 0;
}