Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274930
b: refs/heads/master
c: 4d523b6
h: refs/heads/master
v: v3
  • Loading branch information
Jason Liu authored and Artem Bityutskiy committed Sep 11, 2011
1 parent f5a7a01 commit 2995116
Show file tree
Hide file tree
Showing 2 changed files with 5 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: e2e24e8ebf0e96571fbbac95c215df6a2cebbc5b
refs/heads/master: 4d523b60ef9d1953d9e12745ca0ed3e2dc98c189
7 changes: 4 additions & 3 deletions trunk/drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,13 @@ int mtd_device_parse_register(struct mtd_info *mtd, const char **types,
struct mtd_partition *real_parts;

err = parse_mtd_partitions(mtd, types, &real_parts, parser_data);
if (err <= 0 && nr_parts) {
if (err <= 0 && nr_parts && parts) {
real_parts = kmemdup(parts, sizeof(*parts) * nr_parts,
GFP_KERNEL);
err = nr_parts;
if (!parts)
if (!real_parts)
err = -ENOMEM;
else
err = nr_parts;
}

if (err > 0) {
Expand Down

0 comments on commit 2995116

Please sign in to comment.