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:

committed by
David S. Miller

parent
9d11bd1592
commit
0d2e7a5c60
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user