git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[pandora-kernel.git]
/
drivers
/
mtd
/
cmdlinepart.c
diff --git
a/drivers/mtd/cmdlinepart.c
b/drivers/mtd/cmdlinepart.c
index
50a3403
..
5011fa7
100644
(file)
--- a/
drivers/mtd/cmdlinepart.c
+++ b/
drivers/mtd/cmdlinepart.c
@@
-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;
}
}