aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_rate.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_rate.c')
-rw-r--r--net/mac80211/ieee80211_rate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
index 16e850864b8a..2118de04fc35 100644
--- a/net/mac80211/ieee80211_rate.c
+++ b/net/mac80211/ieee80211_rate.c
@@ -24,11 +24,10 @@ int ieee80211_rate_control_register(struct rate_control_ops *ops)
24{ 24{
25 struct rate_control_alg *alg; 25 struct rate_control_alg *alg;
26 26
27 alg = kmalloc(sizeof(*alg), GFP_KERNEL); 27 alg = kzalloc(sizeof(*alg), GFP_KERNEL);
28 if (alg == NULL) { 28 if (alg == NULL) {
29 return -ENOMEM; 29 return -ENOMEM;
30 } 30 }
31 memset(alg, 0, sizeof(*alg));
32 alg->ops = ops; 31 alg->ops = ops;
33 32
34 mutex_lock(&rate_ctrl_mutex); 33 mutex_lock(&rate_ctrl_mutex);