diff options
author | Kedareswara rao Appana <appana.durga.rao@xilinx.com> | 2017-12-07 10:54:28 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-24 11:01:23 +0100 |
commit | e2a6f2967f674e9ff73a0572c0c99229255a7fa0 (patch) | |
tree | 580ddb8281c91234672600ca803f687496a3e8eb /drivers/dma | |
parent | f4a0f85594baa84dfddfa36ae857fccb8f2606df (diff) | |
download | linux-stable-e2a6f2967f674e9ff73a0572c0c99229255a7fa0.tar.gz linux-stable-e2a6f2967f674e9ff73a0572c0c99229255a7fa0.tar.bz2 linux-stable-e2a6f2967f674e9ff73a0572c0c99229255a7fa0.zip |
dmaengine: zynqmp_dma: Fix race condition in the probe
[ Upstream commit 5ba080aada5e739165e0f38d5cc3b04c82b323c8 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma')
-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 1ee1241ca797..5cc8ed31f26b 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -838,7 +838,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); clk_disable_unprepare(chan->clk_apb); |