From: Markus Elfring Date: Mon, 1 Dec 2014 05:06:57 +0000 (+0100) Subject: dmaenegine: Delete a check before free_percpu() X-Git-Tag: v3.19-rc1~100^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a9507ca3fb90987db5c6cc385885782cb05d4967;p=linux-2.6-block.git 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 Signed-off-by: Vinod Koul --- 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) 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;