OSDN Git Service

staging: gdm72xx: Remove unnecessary memset of netdev private data
authorTobias Klauser <tklauser@distanz.ch>
Tue, 8 Jul 2014 08:00:56 +0000 (10:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 18:57:16 +0000 (11:57 -0700)
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@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm72xx/gdm_wimax.c

index f96f1d0..0f71d41 100644 (file)
@@ -882,8 +882,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;