mtd: partitions: remove kmemdup()
authorBrian Norris <computersforpeace@gmail.com>
Fri, 4 Dec 2015 23:25:16 +0000 (15:25 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 9 Dec 2015 18:22:06 +0000 (10:22 -0800)
commitc42c2710d64381fd48d36b278e0744aa683d93fe
treeec4f9032ebeb7ff4b28bd064c2683bd359143da1
parent5531ae4818fb04b9a30f87099f44595c1786f518
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>
drivers/mtd/mtdcore.c
drivers/mtd/mtdcore.h
drivers/mtd/mtdpart.c