mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 07:30:06 -04:00
mtd: spi-nor: remove unneeded smpt zeroization
The entire smpt array is initialized with data read from sfdp, there is no need to init it with zeroes before. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
This commit is contained in:
committed by
Boris Brezillon
parent
2595646791
commit
e7b65a49c4
@@ -3091,7 +3091,7 @@ static int spi_nor_parse_smpt(struct spi_nor *nor,
|
||||
|
||||
/* Read the Sector Map Parameter Table. */
|
||||
len = smpt_header->length * sizeof(*smpt);
|
||||
smpt = kzalloc(len, GFP_KERNEL);
|
||||
smpt = kmalloc(len, GFP_KERNEL);
|
||||
if (!smpt)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user