summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdpart.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-12-05 00:25:16 +0100
committerBrian Norris <computersforpeace@gmail.com>2015-12-09 19:22:06 +0100
commitc42c2710d64381fd48d36b278e0744aa683d93fe (patch)
treeec4f9032ebeb7ff4b28bd064c2683bd359143da1 /drivers/mtd/mtdpart.c
parentmtd: partitions: rename MTD parser get/put (diff)
downloadlinux-c42c2710d64381fd48d36b278e0744aa683d93fe.tar.xz
linux-c42c2710d64381fd48d36b278e0744aa683d93fe.zip
mtd: partitions: remove kmemdup()
The use of kmemdup() complicates the error handling a bit. We don't actually need to allocate new memory, since this reference is treated as const, and it is copied into new memory by the partition registration code anyway. So remove it. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r--drivers/mtd/mtdpart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 4a660ae27bb2..898999c5aea1 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -760,7 +760,7 @@ static const char * const default_mtd_part_types[] = {
* point to an array containing this number of &struct mtd_info objects.
*/
int parse_mtd_partitions(struct mtd_info *master, const char *const *types,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct mtd_part_parser *parser;