Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142315
b: refs/heads/master
c: 17b536c
h: refs/heads/master
i:
  142313: d9e012c
  142311: 0ba8eeb
v: v3
  • Loading branch information
Atsushi Nemoto authored and David Woodhouse committed Mar 20, 2009
1 parent aaaa1b1 commit 6ec693f
Show file tree
Hide file tree
Showing 3 changed files with 10 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: bd50a0ffca0bbb9baa60ab1ef2c09cf7561e1223
refs/heads/master: 17b536cc43bcf2afcc20b4812f93a895881b5f4f
6 changes: 4 additions & 2 deletions trunk/drivers/mtd/ar7part.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ struct ar7_bin_rec {
unsigned int address;
};

static struct mtd_partition ar7_parts[AR7_PARTS];

static int create_mtd_partitions(struct mtd_info *master,
struct mtd_partition **pparts,
unsigned long origin)
Expand All @@ -57,7 +55,11 @@ static int create_mtd_partitions(struct mtd_info *master,
unsigned int root_offset = ROOT_OFFSET;

int retries = 10;
struct mtd_partition *ar7_parts;

ar7_parts = kzalloc(sizeof(*ar7_parts) * AR7_PARTS, GFP_KERNEL);
if (!ar7_parts)
return -ENOMEM;
ar7_parts[0].name = "loader";
ar7_parts[0].offset = 0;
ar7_parts[0].size = master->erasesize;
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/mtd/cmdlinepart.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ static int parse_cmdline_partitions(struct mtd_info *master,
}
offset += part->parts[i].size;
}
*pparts = part->parts;
*pparts = kmemdup(part->parts,
sizeof(*part->parts) * part->num_parts,
GFP_KERNEL);
if (!*pparts)
return -ENOMEM;
return part->num_parts;
}
}
Expand Down

0 comments on commit 6ec693f

Please sign in to comment.