diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-09-08 12:56:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-09-08 12:56:20 -0400 |
commit | c5e68c4fa55c0d65e28b4b566b50aee6c4185dab (patch) | |
tree | 075dc6586ccfcddc1e6f5d0af7a6990954227698 /drivers/regulator/pfuze100-regulator.c | |
parent | b1d27aa3b16a4689d5598abc545a88e5cda93f1d (diff) | |
parent | 475043fabe8c58fb18c32c7942d8754897bd11fa (diff) |
Merge tag 'regulator-fix-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown:
"One core fix here improving the error handling on enable failure, plus
smaller fixes for the pfuze100 drive and the SPMI DT bindings"
* tag 'regulator-fix-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: Fix qcom,spmi-regulator schema
regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe()
regulator: core: Clean up on enable failure
Diffstat (limited to 'drivers/regulator/pfuze100-regulator.c')
-rw-r--r-- | drivers/regulator/pfuze100-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index 6b617024a67d..d899d6e98fb8 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -766,7 +766,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client, ((pfuze_chip->chip_id == PFUZE3000) ? "3000" : "3001")))); memcpy(pfuze_chip->regulator_descs, pfuze_chip->pfuze_regulators, - sizeof(pfuze_chip->regulator_descs)); + regulator_num * sizeof(struct pfuze_regulator)); ret = pfuze_parse_regulators_dt(pfuze_chip); if (ret) |