From: Lars-Peter Clausen Date: Sat, 21 Nov 2015 11:09:48 +0000 (+0100) Subject: dmaengine: img-mdc: Remove unnecessary synchronize_irq() before devm_free_irq() X-Git-Tag: v4.5-rc1~120^2~17 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9ff68186eaac415bfc0b84d627b7ecec24b0c52d;p=linux.git dmaengine: img-mdc: Remove unnecessary synchronize_irq() before devm_free_irq() Calling synchronize_irq() right before devm_free_irq() is quite useless. On one hand the IRQ can easily fire again before devm_free_irq() is entered, on the other hand devm_free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patch was generated using the following semantic patch: // @@ expression irq, dev; @@ -synchronize_irq(irq); devm_free_irq(dev, irq, ...); // Signed-off-by: Lars-Peter Clausen Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/img-mdc-dma.c b/drivers/dma/img-mdc-dma.c index 9ca56830cc63..42ae58d1e303 100644 --- a/drivers/dma/img-mdc-dma.c +++ b/drivers/dma/img-mdc-dma.c @@ -979,7 +979,6 @@ static int mdc_dma_remove(struct platform_device *pdev) vc.chan.device_node) { list_del(&mchan->vc.chan.device_node); - synchronize_irq(mchan->irq); devm_free_irq(&pdev->dev, mchan->irq, mchan); tasklet_kill(&mchan->vc.task);