• Dan Carpenter's avatar
    mtd: pmcmsp-flash: Allocating too much in init_msp_flash() · 79ad07d4
    Dan Carpenter authored
    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: 68aa0fa8 ('[MTD] PMC MSP71xx flash/rootfs mappings')
    Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
    79ad07d4
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
amd76xrom.c Loading commit data...
bfin-async-flash.c Loading commit data...
cfi_flagadm.c Loading commit data...
ck804xrom.c Loading commit data...
dc21285.c Loading commit data...
esb2rom.c Loading commit data...
gpio-addr-flash.c Loading commit data...
ichxrom.c Loading commit data...
impa7.c Loading commit data...
intel_vr_nor.c Loading commit data...
ixp4xx.c Loading commit data...
l440gx.c Loading commit data...
lantiq-flash.c Loading commit data...
latch-addr-flash.c Loading commit data...
map_funcs.c Loading commit data...
netsc520.c Loading commit data...
nettel.c Loading commit data...
pci.c Loading commit data...
pcmciamtd.c Loading commit data...
physmap.c Loading commit data...
physmap_of.c Loading commit data...
physmap_of_versatile.c Loading commit data...
physmap_of_versatile.h Loading commit data...
pismo.c Loading commit data...
plat-ram.c Loading commit data...
pmcmsp-flash.c Loading commit data...
pxa2xx-flash.c Loading commit data...
rbtx4939-flash.c Loading commit data...
sa1100-flash.c Loading commit data...
sbc_gxx.c Loading commit data...
sc520cdp.c Loading commit data...
scb2_flash.c Loading commit data...
scx200_docflash.c Loading commit data...
solutionengine.c Loading commit data...
sun_uflash.c Loading commit data...
ts5500_flash.c Loading commit data...
tsunami_flash.c Loading commit data...
uclinux.c Loading commit data...
vmu-flash.c Loading commit data...