Skip to contentSkip to conversation

spi/nuc900: Remove unnecessary memset of struct nuc900_spi

PATCH New Tobias Klauser 2 participants 2 messages Feb 1, 2012 – Feb 2, 2012 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi/nuc900: Remove unnecessary memset of struct nuc900_spi

The memory allocated using kzalloc by spi_alloc_master so it doesn't need to be set to 0 again.

---
 drivers/spi/spi-nuc900.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/spi/spi-nuc900.c +0 -2
index 182e9c8..dae8be2 100644
@@ -360,8 +360,6 @@ static int __devinit nuc900_spi_probe(struct platform_device *pdev)
 	}
 
 	hw = spi_master_get_devdata(master);
-	memset(hw, 0, sizeof(struct nuc900_spi));
-
 	hw->master = spi_master_get(master);
 	hw->pdata  = pdev->dev.platform_data;
 	hw->dev = &pdev->dev;
Signature · 1 line
1.7.5.4
Applied
#1 lore raw

PATCH 1/1 spi/nuc900: Remove unnecessary memset of struct nuc900_spi

Quoted 4 lines · Tobias Klauser

The memory allocated using kzalloc by spi_alloc_master so it doesn't need to be set to 0 again.

Merged, thanks.

g.

Quoted 20 lines
---
 drivers/spi/spi-nuc900.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/spi/spi-nuc900.c +0 -2
index 182e9c8..dae8be2 100644
@@ -360,8 +360,6 @@ static int __devinit nuc900_spi_probe(struct platform_device *pdev)
 	}
 
 	hw = spi_master_get_devdata(master);
-	memset(hw, 0, sizeof(struct nuc900_spi));
-
 	hw->master = spi_master_get(master);
 	hw->pdata  = pdev->dev.platform_data;
 	hw->dev = &pdev->dev;
Signature · 1 line
1.7.5.4