aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/arizona-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-08 18:45:53 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-07-08 18:45:53 -0400
commit3a36a0db5b0f77ff71a9df23db9f4044e04590d8 (patch)
tree2c681a5c6af9c6507959b4a5cfbc4dee6cffc7e3 /drivers/mfd/arizona-core.c
parent863df8d5f1a1a92016e24c80947cb3509b8aaa48 (diff)
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>
Diffstat (limited to 'drivers/mfd/arizona-core.c')
-rw-r--r--drivers/mfd/arizona-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 7f837edfbfb7..5cbacf6e2bf7 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -514,7 +514,7 @@ err_reset:
514err_dcvdd: 514err_dcvdd:
515 regulator_disable(arizona->dcvdd); 515 regulator_disable(arizona->dcvdd);
516err_enable: 516err_enable:
517 regulator_bulk_disable(ARRAY_SIZE(arizona->core_supplies), 517 regulator_bulk_disable(arizona->num_core_supplies,
518 arizona->core_supplies); 518 arizona->core_supplies);
519err_early: 519err_early:
520 mfd_remove_devices(dev); 520 mfd_remove_devices(dev);