lkml.org 
[lkml]   [2012]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/6] mfd: arizona: Don't free unallocated supplies on error
Date
ARRAY_SIZE() may be larger than the number of supplies actually used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/mfd/arizona-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 4d249ed..a55e52e 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);
--
1.7.10


\
 
 \ /
  Last update: 2012-07-05 22:21    [W:0.048 / U:0.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site