Skip to content

Commit

Permalink
UBI: amend array size
Browse files Browse the repository at this point in the history
Since the data offset parameter was removed, the size of
the parameters array is now 2, not 3.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jan 25, 2008
1 parent 4ccf8cf commit ddc4939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/ubi/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
struct mtd_dev_param *p;
char buf[MTD_PARAM_LEN_MAX];
char *pbuf = &buf[0];
char *tokens[3] = {NULL, NULL, NULL};
char *tokens[2] = {NULL, NULL};

if (!val)
return -EINVAL;
Expand Down Expand Up @@ -1129,7 +1129,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
if (buf[len - 1] == '\n')
buf[len - 1] = '\0';

for (i = 0; i < 3; i++)
for (i = 0; i < 2; i++)
tokens[i] = strsep(&pbuf, ",");

if (pbuf) {
Expand Down

0 comments on commit ddc4939

Please sign in to comment.