diff options
author | Huang Chao <chao7.huang@samsung.com> | 2014-07-05 13:25:12 +0800 |
---|---|---|
committer | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-07-10 01:05:49 -0700 |
commit | cbb08c10fd61c0ebb70b029324508874a438b35e (patch) | |
tree | 202189bad5c368cb196c9618d7ae082809264578 | |
parent | 9594049ba923608e763dfa2dc40d1911dcf793c8 (diff) | |
download | linux-3.10-cbb08c10fd61c0ebb70b029324508874a438b35e.tar.gz linux-3.10-cbb08c10fd61c0ebb70b029324508874a438b35e.tar.bz2 linux-3.10-cbb08c10fd61c0ebb70b029324508874a438b35e.zip |
ASoC: samsung: dma: Remove the unnecessary dma chan pointer check
After DMA request slave channel failed and return NULL in dma_open,
the snd_dmaengine_pcm_open function will check and handle it.
Besides, there is no need to call kfree with NULL argument when a
dma_request_slave_channel call fails.
Change-Id: I02629dd74b9c535bb134f5516bf3c03a239bd241
Signed-off-by: Huang Chao <chao7.huang@samsung.com>
-rw-r--r-- | sound/soc/samsung/dma.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index b39820b1461..26db25da19c 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -120,11 +120,6 @@ static int dma_open(struct snd_pcm_substream *substream) else chan = dma_request_slave_channel(rtd->cpu_dai->dev, dma_chan_names[1]); - if (!chan) { - pr_err("%s: failed to request dma chan\n", __func__); - kfree(chan); - return -EFAULT; - } return snd_dmaengine_pcm_open(substream, chan); } |