summaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmaengine.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2013-09-02 14:10:46 +0200
committerVinod Koul <vinod.koul@intel.com>2013-09-02 14:10:46 +0200
commit592745e2f8afbaeafcf72645f0a2b0285644e091 (patch)
tree5deafbb5ba32bf7a4834af9b7c64d5f31ebfcb39 /drivers/dma/dmaengine.c
parentMerge branch 'topic/api_caps' into for-linus (diff)
parentdma: of: make error message more meaningful by adding the node name (diff)
downloadlinux-592745e2f8afbaeafcf72645f0a2b0285644e091.tar.xz
linux-592745e2f8afbaeafcf72645f0a2b0285644e091.zip
Merge branch 'topic/of' into for-linus
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r--drivers/dma/dmaengine.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 0947ff64152e..d7d94d21a038 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -514,16 +514,16 @@ struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
/* lock against __dma_request_channel */
mutex_lock(&dma_list_mutex);
- if (chan->client_count == 0)
+ if (chan->client_count == 0) {
err = dma_chan_get(chan);
- else
+ if (err)
+ pr_debug("%s: failed to get %s: (%d)\n",
+ __func__, dma_chan_name(chan), err);
+ } else
chan = NULL;
mutex_unlock(&dma_list_mutex);
- if (err)
- pr_debug("%s: failed to get %s: (%d)\n",
- __func__, dma_chan_name(chan), err);
return chan;
}