treewide: kzalloc() -> kcalloc()
[linux-2.6-microblaze.git] / drivers / net / wireless / intersil / p54 / eeprom.c
index d4c73d3..de2ef95 100644 (file)
@@ -161,8 +161,9 @@ static int p54_generate_band(struct ieee80211_hw *dev,
        if (!tmp)
                goto err_out;
 
-       tmp->channels = kzalloc(sizeof(struct ieee80211_channel) *
-                               list->band_channel_num[band], GFP_KERNEL);
+       tmp->channels = kcalloc(list->band_channel_num[band],
+                               sizeof(struct ieee80211_channel),
+                               GFP_KERNEL);
        if (!tmp->channels)
                goto err_out;
 
@@ -344,7 +345,7 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev)
                goto free;
        }
        priv->chan_num = max_channel_num;
-       priv->survey = kzalloc(sizeof(struct survey_info) * max_channel_num,
+       priv->survey = kcalloc(max_channel_num, sizeof(struct survey_info),
                               GFP_KERNEL);
        if (!priv->survey) {
                ret = -ENOMEM;
@@ -352,8 +353,9 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev)
        }
 
        list->max_entries = max_channel_num;
-       list->channels = kzalloc(sizeof(struct p54_channel_entry) *
-                                max_channel_num, GFP_KERNEL);
+       list->channels = kcalloc(max_channel_num,
+                                sizeof(struct p54_channel_entry),
+                                GFP_KERNEL);
        if (!list->channels) {
                ret = -ENOMEM;
                goto free;