]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dmaengine: imx-dma: fix missing unlock on error in imxdma_xfer_desc()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sun, 21 Oct 2012 11:58:30 +0000 (19:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 17:10:21 +0000 (10:10 -0700)
commit 720dfd250e48a8c7fd1b2b8645955413989c4ee0 upstream.

Add the missing unlock on the error handling path in function
imxdma_xfer_desc().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/imx-dma.c

index 5084975d793cd25949e62ae68f5932bd3c456763..8aa91132e9ab085df2c26d70999a4cdf9f323fa6 100644 (file)
@@ -474,8 +474,10 @@ static int imxdma_xfer_desc(struct imxdma_desc *d)
                        slot = i;
                        break;
                }
-               if (slot < 0)
+               if (slot < 0) {
+                       spin_unlock_irqrestore(&imxdma->lock, flags);
                        return -EBUSY;
+               }
 
                imxdma->slots_2d[slot].xsr = d->x;
                imxdma->slots_2d[slot].ysr = d->y;