summaryrefslogtreecommitdiff
path: root/drivers/mfd/max8925-i2c.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2014-08-28 11:01:15 +0100
committerLee Jones <lee.jones@linaro.org>2014-09-26 08:15:46 +0100
commit87bd1c925040d97927c6f6b7fe41a487c7d976ef (patch)
treee82afdc0ab4bec1fa67bd302155abe6dd224a76d /drivers/mfd/max8925-i2c.c
parent7a36ceb284f76d696c80998cc38f6d1c6721ac6d (diff)
mfd: max8925-i2c: Fix variable length array Sparse warning
The largest byte size in use currently is 8. Fix array size to 9. drivers/mfd/max8925-i2c.c:40:33: warning: Variable length array is used Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/max8925-i2c.c')
-rw-r--r--drivers/mfd/max8925-i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c
index ecbe78ead3b6..c880c895c5a6 100644
--- a/drivers/mfd/max8925-i2c.c
+++ b/drivers/mfd/max8925-i2c.c
@@ -37,7 +37,7 @@ static inline int max8925_read_device(struct i2c_client *i2c,
static inline int max8925_write_device(struct i2c_client *i2c,
int reg, int bytes, void *src)
{
- unsigned char buf[bytes + 1];
+ unsigned char buf[9];
int ret;
buf[0] = (unsigned char)reg;