|
@@ -831,11 +831,11 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev,
|
|
|
if (spec->supported_rates & SUPPORT_RATE_OFDM)
|
|
|
num_rates += 8;
|
|
|
|
|
|
- channels = kzalloc(sizeof(*channels) * spec->num_channels, GFP_KERNEL);
|
|
|
+ channels = kcalloc(spec->num_channels, sizeof(*channels), GFP_KERNEL);
|
|
|
if (!channels)
|
|
|
return -ENOMEM;
|
|
|
|
|
|
- rates = kzalloc(sizeof(*rates) * num_rates, GFP_KERNEL);
|
|
|
+ rates = kcalloc(num_rates, sizeof(*rates), GFP_KERNEL);
|
|
|
if (!rates)
|
|
|
goto exit_free_channels;
|
|
|
|