diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-12-01 00:06:57 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-12-09 04:26:55 -0500 |
commit | a9507ca3fb90987db5c6cc385885782cb05d4967 (patch) | |
tree | 790262ea3e7e132ce4cfd8fbb5997a344589b502 | |
parent | 4ff2fd839ce86b1e2b1fed543886930a493de588 (diff) |
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>
-rw-r--r-- | drivers/dma/dmaengine.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 24bfaf0b92ba..e057935e3023 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -330,8 +330,7 @@ static int __init dma_channel_table_init(void) | |||
330 | if (err) { | 330 | if (err) { |
331 | pr_err("initialization failure\n"); | 331 | pr_err("initialization failure\n"); |
332 | for_each_dma_cap_mask(cap, dma_cap_mask_all) | 332 | for_each_dma_cap_mask(cap, dma_cap_mask_all) |
333 | if (channel_table[cap]) | 333 | free_percpu(channel_table[cap]); |
334 | free_percpu(channel_table[cap]); | ||
335 | } | 334 | } |
336 | 335 | ||
337 | return err; | 336 | return err; |