···5053505350545054 init_data = regulator_of_get_init_data(dev, regulator_desc, config,50555055 &rdev->dev.of_node);50565056+50575057+ /*50585058+ * Sometimes not all resources are probed already so we need to take50595059+ * that into account. This happens most the time if the ena_gpiod comes50605060+ * from a gpio extender or something else.50615061+ */50625062+ if (PTR_ERR(init_data) == -EPROBE_DEFER) {50635063+ kfree(config);50645064+ kfree(rdev);50655065+ ret = -EPROBE_DEFER;50665066+ goto rinse;50675067+ }50685068+50565069 /*50575070 * We need to keep track of any GPIO descriptor coming from the50585071 * device tree until we have handled it over to the core. If the
···231231 "regulator-off-in-suspend"))232232 suspend_state->enabled = DISABLE_IN_SUSPEND;233233234234- if (!of_property_read_u32(np, "regulator-suspend-min-microvolt",235235- &pval))234234+ if (!of_property_read_u32(suspend_np,235235+ "regulator-suspend-min-microvolt", &pval))236236 suspend_state->min_uV = pval;237237238238- if (!of_property_read_u32(np, "regulator-suspend-max-microvolt",239239- &pval))238238+ if (!of_property_read_u32(suspend_np,239239+ "regulator-suspend-max-microvolt", &pval))240240 suspend_state->max_uV = pval;241241242242 if (!of_property_read_u32(suspend_np,···445445 goto error;446446 }447447448448- if (desc->of_parse_cb && desc->of_parse_cb(child, desc, config)) {449449- dev_err(dev,450450- "driver callback failed to parse DT for regulator %pOFn\n",451451- child);452452- goto error;448448+ if (desc->of_parse_cb) {449449+ int ret;450450+451451+ ret = desc->of_parse_cb(child, desc, config);452452+ if (ret) {453453+ if (ret == -EPROBE_DEFER) {454454+ of_node_put(child);455455+ return ERR_PTR(-EPROBE_DEFER);456456+ }457457+ dev_err(dev,458458+ "driver callback failed to parse DT for regulator %pOFn\n",459459+ child);460460+ goto error;461461+ }453462 }454463455464 *node = child;
+7-1
drivers/regulator/pfuze100-regulator.c
···788788789789 /* SW2~SW4 high bit check and modify the voltage value table */790790 if (i >= sw_check_start && i <= sw_check_end) {791791- regmap_read(pfuze_chip->regmap, desc->vsel_reg, &val);791791+ ret = regmap_read(pfuze_chip->regmap,792792+ desc->vsel_reg, &val);793793+ if (ret) {794794+ dev_err(&client->dev, "Fails to read from the register.\n");795795+ return ret;796796+ }797797+792798 if (val & sw_hi) {793799 if (pfuze_chip->chip_id == PFUZE3000 ||794800 pfuze_chip->chip_id == PFUZE3001) {