提交 ddc49391 编写于 作者: A Artem Bityutskiy

UBI: amend array size

Since the data offset parameter was removed, the size of
the parameters array is now 2, not 3.
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 4ccf8cff
...@@ -1099,7 +1099,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) ...@@ -1099,7 +1099,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
struct mtd_dev_param *p; struct mtd_dev_param *p;
char buf[MTD_PARAM_LEN_MAX]; char buf[MTD_PARAM_LEN_MAX];
char *pbuf = &buf[0]; char *pbuf = &buf[0];
char *tokens[3] = {NULL, NULL, NULL}; char *tokens[2] = {NULL, NULL};
if (!val) if (!val)
return -EINVAL; return -EINVAL;
...@@ -1129,7 +1129,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) ...@@ -1129,7 +1129,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
if (buf[len - 1] == '\n') if (buf[len - 1] == '\n')
buf[len - 1] = '\0'; buf[len - 1] = '\0';
for (i = 0; i < 3; i++) for (i = 0; i < 2; i++)
tokens[i] = strsep(&pbuf, ","); tokens[i] = strsep(&pbuf, ",");
if (pbuf) { if (pbuf) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册