[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1292998991-26968-5-git-send-email-myungjoo.ham@samsung.com>
Date: Wed, 22 Dec 2010 15:23:09 +0900
From: MyungJoo Ham <myungjoo.ham@...sung.com>
To: linux-kernel@...r.kernel.org
Cc: Samuel Ortiz <sameo@...ux.intel.com>,
Liam Girdwood <lrg@...mlogic.co.uk>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Alessandro Zummo <a.zummo@...ertech.it>,
Kyungmin Park <kyungmin.park@...sung.com>,
Joonyoung Shim <jy0922.shim@...sung.com>,
Lukasz Majewski <l.majewski@...sung.com>,
myungjoo.ham@...il.com
Subject: [PATCH v2 4/6] MFD MAX8998/LP3974 Bufgix: accessing array out of bound.
The previous driver may access ldo_voltage_map[] out of its bound at
probe function at line 790 (drivers/regulator/max8998.c). This patch
allocates an entry for every regulator in order to avoid accessing
out-of-bounds.
Signed-off-by: MyungJoo Ham <myungjoo.ham@...sung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@...sung.com>
---
drivers/regulator/max8998.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 7c1478b..d183756 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -110,6 +110,11 @@ static const struct voltage_map_desc *ldo_voltage_map[] = {
&buck12_voltage_map_desc, /* BUCK2 */
&buck3_voltage_map_desc, /* BUCK3 */
&buck4_voltage_map_desc, /* BUCK4 */
+ NULL, /* EN32KHZ_AP */
+ NULL, /* EN32KHZ_CP */
+ NULL, /* ENVICHG */
+ NULL, /* ESAFEOUT1 */
+ NULL, /* ESAFEOUT2 */
};
static inline int max8998_get_ldo(struct regulator_dev *rdev)
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists