regulator: Fix for v6.5
One fix for an issue with parsing partially specified DTs. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmS5MIMACgkQJNaLcl1U h9Cz9Af/VGJG/hTOHkaFop2ThvTEhneMejbGvUAbvbiFiG3qLDcH69oFG7v/smCB n/lKzEqAs5FGiksfj4tRJbQUREaCWOvctyVt6XxFrjc8ewxnZP7YBIYPM/u4KD7t irwqq+0SvjLsX2tjfUYPvCG1+m7OGQWHhygaTuxl+DIucJeGmhevzHtsV+ZBQvyc 1TD2T8CALxMXZp3u5E0hol+42dfSL0SkNixhc6psWqC/hDBXqAdiQ5xXwoK9r6+G R7qw0ODTiWuBbusltlDZ8W+sUvdO977z/+NlCItYVpgVZWAK8ODAYurH+e9fwrvv wjVZe+yS2ZaCjZDC0//1P671r8xmWA== =Njfr -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
2922800a18
|
@ -778,6 +778,9 @@ static int da9063_check_xvp_constraints(struct regulator_config *config)
|
|||
const struct notification_limit *uv_l = &constr->under_voltage_limits;
|
||||
const struct notification_limit *ov_l = &constr->over_voltage_limits;
|
||||
|
||||
if (!config->init_data) /* No config in DT, pointers will be invalid */
|
||||
return 0;
|
||||
|
||||
/* make sure that only one severity is used to clarify if unchanged, enabled or disabled */
|
||||
if ((!!uv_l->prot + !!uv_l->err + !!uv_l->warn) > 1) {
|
||||
dev_err(config->dev, "%s: at most one voltage monitoring severity allowed!\n",
|
||||
|
|
Loading…
Reference in New Issue