mtd: spi-nor: remove unneeded smpt zeroization
authorTudor.Ambarus@microchip.com <Tudor.Ambarus@microchip.com>
Fri, 9 Nov 2018 16:56:56 +0000 (16:56 +0000)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 10 Dec 2018 20:59:07 +0000 (21:59 +0100)
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>
drivers/mtd/spi-nor/spi-nor.c

index 1fdd283..baa6b95 100644 (file)
@@ -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;