2019-06-18 18:05:03

by Hariprasad Kelam

[permalink] [raw]
Subject: [PATCH] staging: rtl8192e: rtllib_module: Remove redundant memset

alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <[email protected]>
---
drivers/staging/rtl8192e/rtllib_module.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtllib_module.c b/drivers/staging/rtl8192e/rtllib_module.c
index bb13b1d..64d9fee 100644
--- a/drivers/staging/rtl8192e/rtllib_module.c
+++ b/drivers/staging/rtl8192e/rtllib_module.c
@@ -83,7 +83,6 @@ struct net_device *alloc_rtllib(int sizeof_priv)
return NULL;
}
ieee = (struct rtllib_device *)netdev_priv_rsl(dev);
- memset(ieee, 0, sizeof(struct rtllib_device) + sizeof_priv);
ieee->dev = dev;

err = rtllib_networks_allocate(ieee);
--
2.7.4