lkml.org 
[lkml]   [2011]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[RFC patch] DMAengine/Langwell: put dev object in error path
From
When allocating resources for DMA channel, if error encountered, the dev object
of the relevant DMA device should be put, corresponding to the get operation.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---
drivers/dma/intel_mid_dma.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index f653517..85bd8f3 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -871,6 +871,7 @@ static int
intel_mid_dma_alloc_chan_resources(struct dma_chan *chan)
if (mid->state == SUSPENDED) {
if (dma_resume(mid->pdev)) {
pr_err("ERR_MDMA: resume failed");
+ pm_runtime_put(&mid->pdev->dev);
return -EFAULT;
}
}

\
 
 \ /
  Last update: 2011-07-27 15:27    [W:0.041 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site