[PATCH] staging: gdm72xx: Remove unnecessary memset of netdev private data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The memory for struct net_device private data is allocated using
kzalloc/vzalloc in alloc_netdev_mqs, thus there is no need to zero it
again in the driver.

Signed-off-by: Tobias Klauser <tklauser@xxxxxxxxxx>
---
 drivers/staging/gdm72xx/gdm_wimax.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c
index 6f44798..47e1dd9 100644
--- a/drivers/staging/gdm72xx/gdm_wimax.c
+++ b/drivers/staging/gdm72xx/gdm_wimax.c
@@ -893,8 +893,6 @@ int register_wimax_device(struct phy_dev *phy_dev, struct device *pdev)
 	memcpy(dev->dev_addr, gdm_wimax_macaddr, sizeof(gdm_wimax_macaddr));
 
 	nic = netdev_priv(dev);
-	memset(nic, 0, sizeof(*nic));
-
 	nic->netdev = dev;
 	nic->phy_dev = phy_dev;
 	phy_dev->netdev = dev;
-- 
2.0.1


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux