mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-11 23:16:43 +07:00
mtd: pxa3xx_nand: initialiaze pxa3xx_flash_ids to 0
pxa3xx_flash_ids wasn't initialized to 0, which in certain cases could end up containing corrupted values in its members. Fix this to avoid possible issues. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
parent
ed446cc720
commit
7c2f717668
@ -1522,6 +1522,8 @@ static int pxa3xx_nand_scan(struct mtd_info *mtd)
|
||||
return ret;
|
||||
}
|
||||
|
||||
memset(pxa3xx_flash_ids, 0, sizeof(pxa3xx_flash_ids));
|
||||
|
||||
pxa3xx_flash_ids[0].name = f->name;
|
||||
pxa3xx_flash_ids[0].dev_id = (f->chip_id >> 8) & 0xffff;
|
||||
pxa3xx_flash_ids[0].pagesize = f->page_size;
|
||||
|
Loading…
Reference in New Issue
Block a user