Skip to content

Commit

Permalink
dmaengine: imx-dma: fix missing unlock on error in imxdma_xfer_desc()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Vinod Koul committed Oct 24, 2012
1 parent ddffeb8 commit 720dfd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/dma/imx-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 720dfd2

Please sign in to comment.