Skip to content

Commit d4f8e13

Browse files
committed
Merge tag 'regulator-fix-v6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown: "Two small driver specific fixes: one incorrect definition for one of the Qualcomm regulators and better handling of poorly formed DTs in the DA9063 driver" * tag 'regulator-fix-v6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: qcom-rpmh: Fix LDO 12 regulator for PM8550 regulator: da9063: better fix null deref with partial DT
2 parents 91aa6c4 + 7cdf554 commit d4f8e13

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

drivers/regulator/da9063-regulator.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -778,9 +778,6 @@ static int da9063_check_xvp_constraints(struct regulator_config *config)
778778
const struct notification_limit *uv_l = &constr->under_voltage_limits;
779779
const struct notification_limit *ov_l = &constr->over_voltage_limits;
780780

781-
if (!config->init_data) /* No config in DT, pointers will be invalid */
782-
return 0;
783-
784781
/* make sure that only one severity is used to clarify if unchanged, enabled or disabled */
785782
if ((!!uv_l->prot + !!uv_l->err + !!uv_l->warn) > 1) {
786783
dev_err(config->dev, "%s: at most one voltage monitoring severity allowed!\n",
@@ -1031,9 +1028,12 @@ static int da9063_regulator_probe(struct platform_device *pdev)
10311028
config.of_node = da9063_reg_matches[id].of_node;
10321029
config.regmap = da9063->regmap;
10331030

1034-
ret = da9063_check_xvp_constraints(&config);
1035-
if (ret)
1036-
return ret;
1031+
/* Checking constraints requires init_data from DT. */
1032+
if (config.init_data) {
1033+
ret = da9063_check_xvp_constraints(&config);
1034+
if (ret)
1035+
return ret;
1036+
}
10371037

10381038
regl->rdev = devm_regulator_register(&pdev->dev, &regl->desc,
10391039
&config);

drivers/regulator/qcom-rpmh-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ static const struct rpmh_vreg_init_data pm8550_vreg_data[] = {
10681068
RPMH_VREG("ldo9", "ldo%s9", &pmic5_pldo, "vdd-l8-l9"),
10691069
RPMH_VREG("ldo10", "ldo%s10", &pmic5_nldo515, "vdd-l1-l4-l10"),
10701070
RPMH_VREG("ldo11", "ldo%s11", &pmic5_nldo515, "vdd-l11"),
1071-
RPMH_VREG("ldo12", "ldo%s12", &pmic5_pldo, "vdd-l12"),
1071+
RPMH_VREG("ldo12", "ldo%s12", &pmic5_nldo515, "vdd-l12"),
10721072
RPMH_VREG("ldo13", "ldo%s13", &pmic5_pldo, "vdd-l2-l13-l14"),
10731073
RPMH_VREG("ldo14", "ldo%s14", &pmic5_pldo, "vdd-l2-l13-l14"),
10741074
RPMH_VREG("ldo15", "ldo%s15", &pmic5_nldo515, "vdd-l15"),

0 commit comments

Comments
 (0)