diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-07-14 13:44:56 +0300 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:58:30 +0200 |
| commit | 54f22586442dd58b265f272e927d4bee5c56c6fd (patch) | |
| tree | ef5ff3e2c787e303d92f459d685042647ea1e05b /tools | |
| parent | 546b74fa6d94c2df63f64c1d360714e5601f4508 (diff) | |
mtd: pmcmsp-flash: Allocating too much in init_msp_flash()
commit 79ad07d45743721010e766e65dc004ad249bd429 upstream.
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: 68aa0fa87f6d ('[MTD] PMC MSP71xx flash/rootfs mappings')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
