rsi: consolidate kmalloc/memset 0 calls to kzalloc
[deliverable/linux.git] / drivers / net / wireless / rsi / rsi_91x_mgmt.c
index 8d110fd9eba1c95d4b1537c26dff1853c7407a42..0391406f09d3a0a023275ece451427fba98c490f 100644 (file)
@@ -1023,7 +1023,7 @@ static int rsi_send_auto_rate_request(struct rsi_common *common)
                return -ENOMEM;
        }
 
-       selected_rates = kmalloc(2 * RSI_TBL_SZ, GFP_KERNEL);
+       selected_rates = kzalloc(2 * RSI_TBL_SZ, GFP_KERNEL);
        if (!selected_rates) {
                rsi_dbg(ERR_ZONE, "%s: Failed in allocation of mem\n",
                        __func__);
@@ -1032,7 +1032,6 @@ static int rsi_send_auto_rate_request(struct rsi_common *common)
        }
 
        memset(skb->data, 0, sizeof(struct rsi_auto_rate));
-       memset(selected_rates, 0, 2 * RSI_TBL_SZ);
 
        auto_rate = (struct rsi_auto_rate *)skb->data;
 
This page took 0.025045 seconds and 5 git commands to generate.