Commit 3a36a0db authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

mfd: Don't free unallocated arizona supplies on error

ARRAY_SIZE() may be larger than the number of supplies actually used.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 863df8d5
......@@ -514,7 +514,7 @@ int __devinit arizona_dev_init(struct arizona *arizona)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment