linux/drivers/mtd/maps
Dan Carpenter 79ad07d457 mtd: pmcmsp-flash: Allocating too much in init_msp_flash()
There is a cut and paste issue here.  The bug is that we are allocating
more memory than necessary for msp_maps.  We should be allocating enough
space for a map_info struct (144 bytes) but we instead allocate enough
for an mtd_info struct (1840 bytes).  It's a small waste.

The other part of this is not harmful but when we allocated msp_flash
then we allocated enough space fro a map_info pointer instead of an
mtd_info pointer.  But since pointers are the same size it works out
fine.

Anyway, I decided to clean up all three allocations a bit to make them
a bit more consistent and clear.

Fixes: 68aa0fa87f ('[MTD] PMC MSP71xx flash/rootfs mappings')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2016-07-15 21:52:34 -07:00
..
amd76xrom.c
bfin-async-flash.c
cfi_flagadm.c
ck804xrom.c mtd: maps: add __init attribute 2016-04-26 00:18:29 -06:00
dc21285.c
esb2rom.c mtd: maps: add __init attribute 2016-04-26 00:18:29 -06:00
gpio-addr-flash.c
ichxrom.c mtd: maps: add __init attribute 2016-04-26 00:18:29 -06:00
impa7.c
intel_vr_nor.c
ixp4xx.c
Kconfig mtd: physmap_of: add a hook for Versatile write protection 2016-04-04 10:33:16 +02:00
l440gx.c
lantiq-flash.c
latch-addr-flash.c
Makefile physmap_of: ensure versatile code is reachable 2016-04-26 01:13:55 +02:00
map_funcs.c
netsc520.c
nettel.c
pci.c
pcmciamtd.c
physmap_of_versatile.c physmap_of: ensure versatile code is reachable 2016-04-26 01:13:55 +02:00
physmap_of_versatile.h mtd: physmap_of: add a hook for Versatile write protection 2016-04-04 10:33:16 +02:00
physmap_of.c mtd: physmap_of: fix set but unused warning 2016-07-09 18:48:53 -07:00
physmap.c
pismo.c
plat-ram.c
pmcmsp-flash.c mtd: pmcmsp-flash: Allocating too much in init_msp_flash() 2016-07-15 21:52:34 -07:00
pxa2xx-flash.c mtd: pxa2xx-flash: switch back from memremap to ioremap_cached 2016-04-04 10:26:40 +02:00
rbtx4939-flash.c
sa1100-flash.c mtd: maps: sa1100-flash: potential NULL dereference 2016-07-15 18:40:25 -07:00
sbc_gxx.c
sc520cdp.c
scb2_flash.c
scx200_docflash.c
solutionengine.c
sun_uflash.c
ts5500_flash.c
tsunami_flash.c
uclinux.c mtd: maps: make uclinux.c driver more explicitly non-modular 2016-04-25 20:19:13 -07:00
vmu-flash.c