From: Mark Brown Date: Sun, 8 Jul 2012 22:45:53 +0000 (+0200) Subject: mfd: Don't free unallocated arizona supplies on error X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3a36a0db5b0f77ff71a9df23db9f4044e04590d8;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Samuel Ortiz --- 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: 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);