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)
committerVinod Koul <vinod.koul@linux.intel.com>
Wed, 24 Oct 2012 03:22:45 +0000 (08:52 +0530)
Add the missing unlock on the error handling path in function
imxdma_xfer_desc().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/imx-dma.c

index f11b5b2..7d9554c 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;