All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new()
@ 2018-02-14  7:15 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2018-02-14  7:15 UTC (permalink / raw)
  To: Katsuhiro Suzuki
  Cc: alsa-devel, kernel-janitors, Takashi Iwai, Liam Girdwood,
	Masahiro Yamada, Mark Brown

The dma_mapping_error() returns true or false, but we want to return
-ENOMEM if there was an error.

Fixes: e98131222ff9 ("ASoC: uniphier: add support for UniPhier AIO compress audio")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/uniphier/aio-compress.c b/sound/soc/uniphier/aio-compress.c
index 7f7abe3ae99d..4751c8bdabec 100644
--- a/sound/soc/uniphier/aio-compress.c
+++ b/sound/soc/uniphier/aio-compress.c
@@ -54,12 +54,11 @@ static int uniphier_aio_comprdma_new(struct snd_soc_pcm_runtime *rtd)
 		dma_dir = DMA_TO_DEVICE;
 
 	sub->compr_addr = dma_map_single(dev, sub->compr_area, size, dma_dir);
-	ret = dma_mapping_error(dev, sub->compr_addr);
-	if (ret) {
+	if (dma_mapping_error(dev, sub->compr_addr)) {
 		kfree(sub->compr_area);
 		sub->compr_area = NULL;
 
-		return ret;
+		return -ENOMEM;
 	}
 
 	sub->compr_bytes = size;

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

* [PATCH] ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new()
@ 2018-02-14  7:15 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2018-02-14  7:15 UTC (permalink / raw)
  To: Katsuhiro Suzuki
  Cc: alsa-devel, kernel-janitors, Takashi Iwai, Liam Girdwood,
	Masahiro Yamada, Mark Brown

The dma_mapping_error() returns true or false, but we want to return
-ENOMEM if there was an error.

Fixes: e98131222ff9 ("ASoC: uniphier: add support for UniPhier AIO compress audio")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/uniphier/aio-compress.c b/sound/soc/uniphier/aio-compress.c
index 7f7abe3ae99d..4751c8bdabec 100644
--- a/sound/soc/uniphier/aio-compress.c
+++ b/sound/soc/uniphier/aio-compress.c
@@ -54,12 +54,11 @@ static int uniphier_aio_comprdma_new(struct snd_soc_pcm_runtime *rtd)
 		dma_dir = DMA_TO_DEVICE;
 
 	sub->compr_addr = dma_map_single(dev, sub->compr_area, size, dma_dir);
-	ret = dma_mapping_error(dev, sub->compr_addr);
-	if (ret) {
+	if (dma_mapping_error(dev, sub->compr_addr)) {
 		kfree(sub->compr_area);
 		sub->compr_area = NULL;
 
-		return ret;
+		return -ENOMEM;
 	}
 
 	sub->compr_bytes = size;

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

* Re: [alsa-devel] [PATCH] ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new()
  2018-02-14  7:15 ` Dan Carpenter
@ 2018-02-14 10:37   ` Katsuhiro Suzuki
  -1 siblings, 0 replies; 6+ messages in thread
From: Katsuhiro Suzuki @ 2018-02-14 10:37 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: alsa-devel, kernel-janitors, Takashi Iwai, Liam Girdwood,
	Masahiro Yamada, Mark Brown


Hello,

Thank you for fixing, this patch works fine
on UniPhier LD20 board.

Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>


On 2018年02月14日 16:15, Dan Carpenter wrote:
> The dma_mapping_error() returns true or false, but we want to return
> -ENOMEM if there was an error.
> 
> Fixes: e98131222ff9 ("ASoC: uniphier: add support for UniPhier AIO compress audio")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/sound/soc/uniphier/aio-compress.c b/sound/soc/uniphier/aio-compress.c
> index 7f7abe3ae99d..4751c8bdabec 100644
> --- a/sound/soc/uniphier/aio-compress.c
> +++ b/sound/soc/uniphier/aio-compress.c
> @@ -54,12 +54,11 @@ static int uniphier_aio_comprdma_new(struct snd_soc_pcm_runtime *rtd)
>   		dma_dir = DMA_TO_DEVICE;
>   
>   	sub->compr_addr = dma_map_single(dev, sub->compr_area, size, dma_dir);
> -	ret = dma_mapping_error(dev, sub->compr_addr);
> -	if (ret) {
> +	if (dma_mapping_error(dev, sub->compr_addr)) {
>   		kfree(sub->compr_area);
>   		sub->compr_area = NULL;
>   
> -		return ret;
> +		return -ENOMEM;
>   	}
>   
>   	sub->compr_bytes = size;
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


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

* Re: [alsa-devel] [PATCH] ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new()
@ 2018-02-14 10:37   ` Katsuhiro Suzuki
  0 siblings, 0 replies; 6+ messages in thread
From: Katsuhiro Suzuki @ 2018-02-14 10:37 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: alsa-devel, kernel-janitors, Takashi Iwai, Liam Girdwood,
	Masahiro Yamada, Mark Brown


Hello,

Thank you for fixing, this patch works fine
on UniPhier LD20 board.

Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>


On 2018年02月14日 16:15, Dan Carpenter wrote:
> The dma_mapping_error() returns true or false, but we want to return
> -ENOMEM if there was an error.
> 
> Fixes: e98131222ff9 ("ASoC: uniphier: add support for UniPhier AIO compress audio")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/sound/soc/uniphier/aio-compress.c b/sound/soc/uniphier/aio-compress.c
> index 7f7abe3ae99d..4751c8bdabec 100644
> --- a/sound/soc/uniphier/aio-compress.c
> +++ b/sound/soc/uniphier/aio-compress.c
> @@ -54,12 +54,11 @@ static int uniphier_aio_comprdma_new(struct snd_soc_pcm_runtime *rtd)
>   		dma_dir = DMA_TO_DEVICE;
>   
>   	sub->compr_addr = dma_map_single(dev, sub->compr_area, size, dma_dir);
> -	ret = dma_mapping_error(dev, sub->compr_addr);
> -	if (ret) {
> +	if (dma_mapping_error(dev, sub->compr_addr)) {
>   		kfree(sub->compr_area);
>   		sub->compr_area = NULL;
>   
> -		return ret;
> +		return -ENOMEM;
>   	}
>   
>   	sub->compr_bytes = size;
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


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

* Applied "ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new()" to the asoc tree
  2018-02-14  7:15 ` Dan Carpenter
@ 2018-02-14 13:29   ` Mark Brown
  -1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2018-02-14 13:29 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Katsuhiro Suzuki, Mark Brown

The patch

   ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 21957b5bf0ff607e6e0ed55a3a89454e969511ba Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 14 Feb 2018 10:15:31 +0300
Subject: [PATCH] ASoC: uniphier: fix an error code in
 uniphier_aio_comprdma_new()

The dma_mapping_error() returns true or false, but we want to return
-ENOMEM if there was an error.

Fixes: e98131222ff9 ("ASoC: uniphier: add support for UniPhier AIO compress audio")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/uniphier/aio-compress.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/uniphier/aio-compress.c b/sound/soc/uniphier/aio-compress.c
index 7f7abe3ae99d..4751c8bdabec 100644
--- a/sound/soc/uniphier/aio-compress.c
+++ b/sound/soc/uniphier/aio-compress.c
@@ -54,12 +54,11 @@ static int uniphier_aio_comprdma_new(struct snd_soc_pcm_runtime *rtd)
 		dma_dir = DMA_TO_DEVICE;
 
 	sub->compr_addr = dma_map_single(dev, sub->compr_area, size, dma_dir);
-	ret = dma_mapping_error(dev, sub->compr_addr);
-	if (ret) {
+	if (dma_mapping_error(dev, sub->compr_addr)) {
 		kfree(sub->compr_area);
 		sub->compr_area = NULL;
 
-		return ret;
+		return -ENOMEM;
 	}
 
 	sub->compr_bytes = size;
-- 
2.16.1


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

* Applied "ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new()" to the asoc tree
@ 2018-02-14 13:29   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2018-02-14 13:29 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Katsuhiro Suzuki, Mark Brown

The patch

   ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 21957b5bf0ff607e6e0ed55a3a89454e969511ba Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 14 Feb 2018 10:15:31 +0300
Subject: [PATCH] ASoC: uniphier: fix an error code in
 uniphier_aio_comprdma_new()

The dma_mapping_error() returns true or false, but we want to return
-ENOMEM if there was an error.

Fixes: e98131222ff9 ("ASoC: uniphier: add support for UniPhier AIO compress audio")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/uniphier/aio-compress.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/uniphier/aio-compress.c b/sound/soc/uniphier/aio-compress.c
index 7f7abe3ae99d..4751c8bdabec 100644
--- a/sound/soc/uniphier/aio-compress.c
+++ b/sound/soc/uniphier/aio-compress.c
@@ -54,12 +54,11 @@ static int uniphier_aio_comprdma_new(struct snd_soc_pcm_runtime *rtd)
 		dma_dir = DMA_TO_DEVICE;
 
 	sub->compr_addr = dma_map_single(dev, sub->compr_area, size, dma_dir);
-	ret = dma_mapping_error(dev, sub->compr_addr);
-	if (ret) {
+	if (dma_mapping_error(dev, sub->compr_addr)) {
 		kfree(sub->compr_area);
 		sub->compr_area = NULL;
 
-		return ret;
+		return -ENOMEM;
 	}
 
 	sub->compr_bytes = size;
-- 
2.16.1


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

end of thread, other threads:[~2018-02-14 13:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14  7:15 [PATCH] ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new() Dan Carpenter
2018-02-14  7:15 ` Dan Carpenter
2018-02-14 10:37 ` [alsa-devel] " Katsuhiro Suzuki
2018-02-14 10:37   ` Katsuhiro Suzuki
2018-02-14 13:29 ` Applied "ASoC: uniphier: fix an error code in uniphier_aio_comprdma_new()" to the asoc tree Mark Brown
2018-02-14 13:29   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.