From c42c2710d64381fd48d36b278e0744aa683d93fe Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 4 Dec 2015 15:25:16 -0800 Subject: 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 Reviewed-by: Boris Brezillon --- drivers/mtd/mtdcore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/mtdcore.h') diff --git a/drivers/mtd/mtdcore.h b/drivers/mtd/mtdcore.h index 7b0353399a10..537ec66f9cfd 100644 --- a/drivers/mtd/mtdcore.h +++ b/drivers/mtd/mtdcore.h @@ -11,7 +11,7 @@ int del_mtd_device(struct mtd_info *mtd); int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); int del_mtd_partitions(struct mtd_info *); 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); int __init init_mtdchar(void); -- cgit v1.2.1