staging: rtl8192u: ieee80211: Remove redundant memset
authorHariprasad Kelam <hariprasad.kelam@gmail.com>
Tue, 18 Jun 2019 17:55:16 +0000 (23:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jun 2019 12:39:15 +0000 (14:39 +0200)
alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c

index 3532ea9..4a6c3f6 100644 (file)
@@ -109,7 +109,6 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
        }
 
        ieee = netdev_priv(dev);
-       memset(ieee, 0, sizeof(struct ieee80211_device) + sizeof_priv);
        ieee->dev = dev;
 
        err = ieee80211_networks_allocate(ieee);