From: "Jeremy C. Andrus" <[email protected]>

Stack array variables declared in smb347_reg_show() were one element too
short. This patch increases the arrays to their proper size.

Signed-off-by: Jeremy C. Andrus <[email protected]>

Change-Id: I1db786a473cf176899050eb671309af463a9878d
Cc: Stephen Warren <[email protected]>
Cc: Olof Johansson <[email protected]>
---
 drivers/power/smb347-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/smb347-charger.c b/drivers/power/smb347-charger.c
index ff3d233..504c5c6 100755
--- a/drivers/power/smb347-charger.c
+++ b/drivers/power/smb347-charger.c
@@ -1016,7 +1016,7 @@ static void dockin_isr_work_function(struct work_struct 
*dat)
 static ssize_t smb347_reg_show(struct device *dev, struct device_attribute 
*attr, char *buf)
 {
        struct i2c_client *client = charger->client;
-       uint8_t config_reg[14], cmd_reg[1], status_reg[10];
+       uint8_t config_reg[14], cmd_reg[2], status_reg[11];
        int i, ret = 0;
 
        ret += i2c_smbus_read_i2c_block_data(client, smb347_CHARGE, 15, 
config_reg)
-- 
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to