diff options
author | Lee Jones <lee.jones@linaro.org> | 2014-08-28 12:01:15 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-09-26 09:15:46 +0200 |
commit | 87bd1c925040d97927c6f6b7fe41a487c7d976ef (patch) | |
tree | e82afdc0ab4bec1fa67bd302155abe6dd224a76d /drivers/mfd/max8925-i2c.c | |
parent | mfd: 88pm860x-i2c: Fix variable length array Sparse warning (diff) | |
download | linux-87bd1c925040d97927c6f6b7fe41a487c7d976ef.tar.xz linux-87bd1c925040d97927c6f6b7fe41a487c7d976ef.zip |
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.c | 2 |
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; |