diff options
author | Kedareswara rao Appana <appana.durga.rao@xilinx.com> | 2017-12-07 10:54:28 +0530 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-12-18 09:37:06 +0530 |
commit | 5ba080aada5e739165e0f38d5cc3b04c82b323c8 (patch) | |
tree | 0b2a48e911b52b0da4839808bb7b8bc5b08f79fc /drivers/dma/xilinx | |
parent | 8d90035e379c1987d72e5eef8c6c9ed3d86a7ca1 (diff) |
dmaengine: zynqmp_dma: Fix race condition in the probe
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>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/xilinx')
-rw-r--r-- | drivers/dma/xilinx/zynqmp_dma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index a297a2659848..f14645817ed8 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); } |