Skip to content

Commit 2922800

Browse files
committed
Merge tag 'regulator-fix-v6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fix from Mark Brown: "One fix for an issue with parsing partially specified DTs" * tag 'regulator-fix-v6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: da9063: fix null pointer deref with partial DT config
2 parents bfa3037 + 98e2dd5 commit 2922800

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/regulator/da9063-regulator.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,9 @@ 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+
781784
/* make sure that only one severity is used to clarify if unchanged, enabled or disabled */
782785
if ((!!uv_l->prot + !!uv_l->err + !!uv_l->warn) > 1) {
783786
dev_err(config->dev, "%s: at most one voltage monitoring severity allowed!\n",

0 commit comments

Comments
 (0)