Skip to content

Commit

Permalink
ste_dma40: Delete an unnecessary check before the function call "kmem…
Browse files Browse the repository at this point in the history
…_cache_destroy"

The kmem_cache_destroy() 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 <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
elfring authored and Vinod Koul committed Dec 10, 2015
1 parent 8005c49 commit e0f8c58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/dma/ste_dma40.c
Original file line number Diff line number Diff line change
Expand Up @@ -3694,8 +3694,7 @@ static int __init d40_probe(struct platform_device *pdev)

failure:
if (base) {
if (base->desc_slab)
kmem_cache_destroy(base->desc_slab);
kmem_cache_destroy(base->desc_slab);
if (base->virtbase)
iounmap(base->virtbase);

Expand Down

0 comments on commit e0f8c58

Please sign in to comment.