Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+9 -5
+1 -2
Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml
··· 35 35 description: List of regulators and its properties 36 36 type: object 37 37 $ref: regulator.yaml# 38 + unevaluatedProperties: false 38 39 39 40 properties: 40 41 qcom,ocp-max-retries: ··· 100 99 description: 101 100 SAW controlled gang leader. Will be configured as SAW regulator. 102 101 type: boolean 103 - 104 - unevaluatedProperties: false 105 102 106 103 required: 107 104 - compatible
+7 -2
drivers/regulator/core.c
··· 2733 2733 */ 2734 2734 static int _regulator_handle_consumer_enable(struct regulator *regulator) 2735 2735 { 2736 + int ret; 2736 2737 struct regulator_dev *rdev = regulator->rdev; 2737 2738 2738 2739 lockdep_assert_held_once(&rdev->mutex.base); 2739 2740 2740 2741 regulator->enable_count++; 2741 - if (regulator->uA_load && regulator->enable_count == 1) 2742 - return drms_uA_update(rdev); 2742 + if (regulator->uA_load && regulator->enable_count == 1) { 2743 + ret = drms_uA_update(rdev); 2744 + if (ret) 2745 + regulator->enable_count--; 2746 + return ret; 2747 + } 2743 2748 2744 2749 return 0; 2745 2750 }
+1 -1
drivers/regulator/pfuze100-regulator.c
··· 766 766 ((pfuze_chip->chip_id == PFUZE3000) ? "3000" : "3001")))); 767 767 768 768 memcpy(pfuze_chip->regulator_descs, pfuze_chip->pfuze_regulators, 769 - sizeof(pfuze_chip->regulator_descs)); 769 + regulator_num * sizeof(struct pfuze_regulator)); 770 770 771 771 ret = pfuze_parse_regulators_dt(pfuze_chip); 772 772 if (ret)