diff options
author | Tudor.Ambarus@microchip.com <Tudor.Ambarus@microchip.com> | 2018-11-09 19:56:56 +0300 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-12-10 23:59:07 +0300 |
commit | e7b65a49c43fffb61c489a5e07e6d2f6c8a5efe2 (patch) | |
tree | 16b2a1362395954df648944210c59ad46e56e9de /drivers/mtd | |
parent | 2595646791c319cadfdbf271563aac97d0843dc7 (diff) | |
download | linux-e7b65a49c43fffb61c489a5e07e6d2f6c8a5efe2.tar.xz |
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 1fdd2834fbcb..baa6b952e80b 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -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; |