* [v2,4/4] dmaengine: zynqmp_dma: Fix race condition in the probe
@ 2017-12-07 5:24 Kedareswara rao Appana
0 siblings, 0 replies; only message in thread
From: Kedareswara rao Appana @ 2017-12-07 5:24 UTC (permalink / raw)
To: vinod.koul, dan.j.williams, michal.simek, appanad, sr, dave.jiang,
kedare06
Cc: dmaengine, linux-arm-kernel, linux-kernel
Incase of interrupt property is not present,
Driver is trying to free an invalid irq,
This patch fixes it by adding a check before freeing the irq.
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
---
Changes for v2:
--> New patch.
drivers/dma/xilinx/zynqmp_dma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index a297a26..f146458 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -851,7 +851,8 @@ static void zynqmp_dma_chan_remove(struct zynqmp_dma_chan *chan)
if (!chan)
return;
- devm_free_irq(chan->zdev->dev, chan->irq, chan);
+ if (chan->irq)
+ devm_free_irq(chan->zdev->dev, chan->irq, chan);
tasklet_kill(&chan->tasklet);
list_del(&chan->common.device_node);
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-07 5:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07 5:24 [v2,4/4] dmaengine: zynqmp_dma: Fix race condition in the probe Kedareswara rao Appana
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).