提交 87bd1c92 编写于 作者: L Lee Jones

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: NLee Jones <lee.jones@linaro.org>
上级 7a36ceb2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册