diff options
author | Lee Jones <lee.jones@linaro.org> | 2014-08-28 10:01:15 (GMT) |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-09-26 07:15:46 (GMT) |
commit | 87bd1c925040d97927c6f6b7fe41a487c7d976ef (patch) | |
tree | e82afdc0ab4bec1fa67bd302155abe6dd224a76d | |
parent | 7a36ceb284f76d696c80998cc38f6d1c6721ac6d (diff) | |
download | linux-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.c | 2 |
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; |