]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/staging/vt6655/hostap.c
Staging: Use kcalloc or kzalloc
[net-next-2.6.git] / drivers / staging / vt6655 / hostap.c
index fb7775c52339f39be0d6caa1e49630e3a5242c25..195cc36654aeea7a9628812807544d88f3dea5d6 100644 (file)
@@ -90,10 +90,9 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
 
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name);
 
-       pDevice->apdev = kmalloc(sizeof(struct net_device), GFP_KERNEL);
+       pDevice->apdev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
        if (pDevice->apdev == NULL)
                return -ENOMEM;
-       memset(pDevice->apdev, 0, sizeof(struct net_device));
 
     apdev_priv = netdev_priv(pDevice->apdev);
     *apdev_priv = *pDevice;