regulator: core: make regulator_register() EPROBE_DEFER aware
authorMarco Felsch <m.felsch@pengutronix.de>
Tue, 17 Sep 2019 15:40:21 +0000 (17:40 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 17 Sep 2019 15:59:38 +0000 (16:59 +0100)
commitf8970d341eec73c976a3462b9ecdb02b60b84dd6
tree95099c8b375d20b6f445644923d40ebaae3c7348
parent131cb1210d4b58acb0695707dad2eb90dcb50a2a
regulator: core: make regulator_register() EPROBE_DEFER aware

Sometimes it can happen that the regulator_of_get_init_data() can't
retrieve the config due to a not probed device the regulator depends on.
Fix that by checking the return value of of_parse_cb() and return
EPROBE_DEFER in such cases.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.kernel.org/r/20190917154021.14693-4-m.felsch@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c
drivers/regulator/of_regulator.c