summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2014-08-28 10:01:15 (GMT)
committerLee Jones <lee.jones@linaro.org>2014-09-26 07:15:46 (GMT)
commit87bd1c925040d97927c6f6b7fe41a487c7d976ef (patch)
treee82afdc0ab4bec1fa67bd302155abe6dd224a76d
parent7a36ceb284f76d696c80998cc38f6d1c6721ac6d (diff)
downloadlinux-87bd1c925040d97927c6f6b7fe41a487c7d976ef.tar.xz
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>
-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 ecbe78e..c880c89 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;