[PATCH 0/4] mtd: cleanups and small bug fixes for init_msp_flash()

Jesper Juhl jesper.juhl at gmail.com
Sat Aug 25 21:52:33 EDT 2007


Hi,

Here's a small series of patches to do a little cleanup + bug fixing
in drivers/mtd/maps/pmcmsp-flash.c::init_msp_flash().

The patches in this series are

 [PATCH 1/4] mtd: Don't cast kmalloc() return value in drivers/mtd/maps/pmcmsp-flash.c
 [PATCH 2/4] mtd: convert some kmalloc()+memset() calls to kcalloc() in drivers/mtd/maps/pmcmsp-flash.c
 [PATCH 3/4] mtd: Fix a potential NULL ptr deref bug and mem leak in init_msp_flash()
 [PATCH 4/4] mtd: Check for allocation failures and bail out appropriately in init_msp_flash()

Some of the patches touch the same line of code multiple times, but 
they are split this way to 
 a) to keep logical changes seperate and 
 b) to make the patch series 'git bisect' friendly 

There's still more that could be done to this function, such as 
rolling back mem allocations for devices already initialized in 
case a subsequent one fails or similar, but that will have to wait.
This is all I have time for at the moment.

Please consider merging :-)


Kind regards,
  Jesper Juhl <jesper.juhl at gmail.com>





More information about the linux-mtd mailing list