diff options
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/s3c24xx-dma.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c index 4d5a84815ba7..2f91da3db836 100644 --- a/drivers/dma/s3c24xx-dma.c +++ b/drivers/dma/s3c24xx-dma.c | |||
@@ -718,13 +718,15 @@ static int s3c24xx_dma_terminate_all(struct dma_chan *chan) | |||
718 | struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); | 718 | struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); |
719 | struct s3c24xx_dma_engine *s3cdma = s3cchan->host; | 719 | struct s3c24xx_dma_engine *s3cdma = s3cchan->host; |
720 | unsigned long flags; | 720 | unsigned long flags; |
721 | int ret = 0; | ||
721 | 722 | ||
722 | spin_lock_irqsave(&s3cchan->vc.lock, flags); | 723 | spin_lock_irqsave(&s3cchan->vc.lock, flags); |
723 | 724 | ||
724 | if (!s3cchan->phy && !s3cchan->at) { | 725 | if (!s3cchan->phy && !s3cchan->at) { |
725 | dev_err(&s3cdma->pdev->dev, "trying to terminate already stopped channel %d\n", | 726 | dev_err(&s3cdma->pdev->dev, "trying to terminate already stopped channel %d\n", |
726 | s3cchan->id); | 727 | s3cchan->id); |
727 | return -EINVAL; | 728 | ret = -EINVAL; |
729 | goto unlock; | ||
728 | } | 730 | } |
729 | 731 | ||
730 | s3cchan->state = S3C24XX_DMA_CHAN_IDLE; | 732 | s3cchan->state = S3C24XX_DMA_CHAN_IDLE; |
@@ -741,10 +743,10 @@ static int s3c24xx_dma_terminate_all(struct dma_chan *chan) | |||
741 | 743 | ||
742 | /* Dequeue jobs not yet fired as well */ | 744 | /* Dequeue jobs not yet fired as well */ |
743 | s3c24xx_dma_free_txd_list(s3cdma, s3cchan); | 745 | s3c24xx_dma_free_txd_list(s3cdma, s3cchan); |
744 | 746 | unlock: | |
745 | spin_unlock_irqrestore(&s3cchan->vc.lock, flags); | 747 | spin_unlock_irqrestore(&s3cchan->vc.lock, flags); |
746 | 748 | ||
747 | return 0; | 749 | return ret; |
748 | } | 750 | } |
749 | 751 | ||
750 | static int s3c24xx_dma_alloc_chan_resources(struct dma_chan *chan) | 752 | static int s3c24xx_dma_alloc_chan_resources(struct dma_chan *chan) |