wireless: Remove unnecessary alloc/OOM messages, alloc cleanups

alloc failures already get standardized OOM
messages and a dump_stack.

Convert kzalloc's with multiplies to kcalloc.
Convert kmalloc's with multiplies to kmalloc_array.
Remove now unused variables.
Remove unnecessary memset after kzalloc->kcalloc.
Whitespace cleanups for these changes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Joe Perches
2013-02-03 17:28:14 +00:00
committed by David S. Miller
parent 9d11bd1592
commit 0d2e7a5c60
22 changed files with 50 additions and 133 deletions

View File

@@ -288,11 +288,11 @@ struct dfs_pattern_detector *
dfs_pattern_detector_init(enum nl80211_dfs_regions region)
{
struct dfs_pattern_detector *dpd;
dpd = kmalloc(sizeof(*dpd), GFP_KERNEL);
if (dpd == NULL) {
pr_err("allocation of dfs_pattern_detector failed\n");
if (dpd == NULL)
return NULL;
}
*dpd = default_dpd;
INIT_LIST_HEAD(&dpd->channel_detectors);