alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Tegra: Fix error handling in DMA channel alloc
@ 2011-02-23  3:16 Stephen Warren
  2011-02-28 15:08 ` Liam Girdwood
  2011-02-28 15:10 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Warren @ 2011-02-23  3:16 UTC (permalink / raw)
  To: broonie, lrg; +Cc: alsa-devel, Stephen Warren

tegra_dma_allocate_channel() returns NULL on errors, not an error pointer.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 sound/soc/tegra/tegra_pcm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
index 40540b1..3c271f9 100644
--- a/sound/soc/tegra/tegra_pcm.c
+++ b/sound/soc/tegra/tegra_pcm.c
@@ -161,8 +161,8 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream)
 	prtd->dma_req[1].dev = prtd;
 
 	prtd->dma_chan = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT);
-	if (IS_ERR(prtd->dma_chan)) {
-		ret = PTR_ERR(prtd->dma_chan);
+	if (prtd->dma_chan == NULL) {
+		ret = -ENOMEM;
 		goto err;
 	}
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Tegra: Fix error handling in DMA channel alloc
  2011-02-23  3:16 [PATCH] ASoC: Tegra: Fix error handling in DMA channel alloc Stephen Warren
@ 2011-02-28 15:08 ` Liam Girdwood
  2011-02-28 15:10 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-02-28 15:08 UTC (permalink / raw)
  To: Stephen Warren; +Cc: alsa-devel, broonie

On Tue, 2011-02-22 at 20:16 -0700, Stephen Warren wrote:
> tegra_dma_allocate_channel() returns NULL on errors, not an error pointer.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
>  sound/soc/tegra/tegra_pcm.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
> index 40540b1..3c271f9 100644
> --- a/sound/soc/tegra/tegra_pcm.c
> +++ b/sound/soc/tegra/tegra_pcm.c
> @@ -161,8 +161,8 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream)
>  	prtd->dma_req[1].dev = prtd;
>  
>  	prtd->dma_chan = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT);
> -	if (IS_ERR(prtd->dma_chan)) {
> -		ret = PTR_ERR(prtd->dma_chan);
> +	if (prtd->dma_chan == NULL) {
> +		ret = -ENOMEM;
>  		goto err;
>  	}
>  

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Tegra: Fix error handling in DMA channel alloc
  2011-02-23  3:16 [PATCH] ASoC: Tegra: Fix error handling in DMA channel alloc Stephen Warren
  2011-02-28 15:08 ` Liam Girdwood
@ 2011-02-28 15:10 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-02-28 15:10 UTC (permalink / raw)
  To: Stephen Warren; +Cc: alsa-devel, lrg

On Tue, Feb 22, 2011 at 08:16:34PM -0700, Stephen Warren wrote:
> tegra_dma_allocate_channel() returns NULL on errors, not an error pointer.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-28 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23  3:16 [PATCH] ASoC: Tegra: Fix error handling in DMA channel alloc Stephen Warren
2011-02-28 15:08 ` Liam Girdwood
2011-02-28 15:10 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).