Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27770
b: refs/heads/master
c: a6550e5
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Juhl authored and David Woodhouse committed May 14, 2006
1 parent 6e22c06 commit 690223b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 552d9205186428a1e2a49ed577bcbba9f777af37
refs/heads/master: a6550e57f9d074511cf420bdb802ab5e56edc3bb
9 changes: 6 additions & 3 deletions trunk/drivers/mtd/devices/block2mtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ static inline void kill_final_newline(char *str)

static int block2mtd_setup(const char *val, struct kernel_param *kp)
{
char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */
char buf[80+12]; /* 80 for device, 12 for erase size */
char *str = buf;
char *token[2];
char *name;
size_t erase_size = PAGE_SIZE;
Expand All @@ -441,7 +442,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
strcpy(str, val);
kill_final_newline(str);

for (i=0; i<2; i++)
for (i = 0; i < 2; i++)
token[i] = strsep(&str, ",");

if (str)
Expand All @@ -460,8 +461,10 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)

if (token[1]) {
ret = parse_num(&erase_size, token[1]);
if (ret)
if (ret) {
kfree(name);
parse_err("illegal erase size");
}
}

add_device(name, erase_size);
Expand Down

0 comments on commit 690223b

Please sign in to comment.