mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
dmaenegine: Delete a check before free_percpu()
The free_percpu() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
4ff2fd839c
commit
a9507ca3fb
1 changed files with 1 additions and 2 deletions
|
@ -330,8 +330,7 @@ static int __init dma_channel_table_init(void)
|
|||
if (err) {
|
||||
pr_err("initialization failure\n");
|
||||
for_each_dma_cap_mask(cap, dma_cap_mask_all)
|
||||
if (channel_table[cap])
|
||||
free_percpu(channel_table[cap]);
|
||||
free_percpu(channel_table[cap]);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue