mirror of
https://github.com/torvalds/linux.git
synced 2024-12-06 02:52:22 +00:00
mfd: Don't free unallocated arizona supplies on error
ARRAY_SIZE() may be larger than the number of supplies actually used. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
863df8d5f1
commit
3a36a0db5b
@ -514,7 +514,7 @@ err_reset:
|
||||
err_dcvdd:
|
||||
regulator_disable(arizona->dcvdd);
|
||||
err_enable:
|
||||
regulator_bulk_disable(ARRAY_SIZE(arizona->core_supplies),
|
||||
regulator_bulk_disable(arizona->num_core_supplies,
|
||||
arizona->core_supplies);
|
||||
err_early:
|
||||
mfd_remove_devices(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user