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
commit 720dfd2 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>
  • Loading branch information
Wei Yongjun authored and gregkh committed Oct 31, 2012
1 parent 7a263f0 commit fbec514
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 fbec514

Please sign in to comment.