mtd: cleanups and small bug fixes for init_msp_flash()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mtd: Don't cast kmalloc() return value in drivers/mtd/maps/pmcmsp-flash.cdrivers/ | +5 | 3 replies | |
| 2/4 | mtd: convert some kmalloc()+memset() calls to kcalloc() in drivers/mtd/maps/pmcmsp-flash.cdrivers/ | +2 | 0 replies | |
| 3/4 | mtd: Fix a potential NULL ptr deref bug and mem leak in init_msp_flash()drivers/ | +8 | 0 replies | |
| 4/4 | mtd: Check for allocation failures and bail out appropriately in init_msp_flash()drivers/ | +17 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] mtd: cleanups and small bug fixes for init_msp_flash()
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 <[email protected]>