All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: sigmadsp: Fix missleading return value
@ 2016-02-10 14:51 pascal.huerst
  2016-02-10 14:55 ` Lars-Peter Clausen
  2016-02-10 19:22 ` Applied "ASoC: sigmadsp: Fix missleading return value" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: pascal.huerst @ 2016-02-10 14:51 UTC (permalink / raw)
  To: lars; +Cc: alsa-devel, Pascal Huerst

From: Pascal Huerst <pascal.huerst@gmail.com>

Forwarding the return value of i2c_master_send, leads to errors
later on, since i2c_master_send returns the number of bytes
transmittet. Check for ret < 0 instead and return 0 otherwise.

Signed-off-by: Pascal Huerst <pascal.huerst@gmail.com>
---
 sound/soc/codecs/sigmadsp-i2c.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/sigmadsp-i2c.c b/sound/soc/codecs/sigmadsp-i2c.c
index 21ca3a5..d374c18 100644
--- a/sound/soc/codecs/sigmadsp-i2c.c
+++ b/sound/soc/codecs/sigmadsp-i2c.c
@@ -31,7 +31,10 @@ static int sigmadsp_write_i2c(void *control_data,
 
 	kfree(buf);
 
-	return ret;
+	if (ret < 0)
+		return ret;
+
+	return 0;
 }
 
 static int sigmadsp_read_i2c(void *control_data,
-- 
2.4.3

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

* Re: [PATCH] ASoC: sigmadsp: Fix missleading return value
  2016-02-10 14:51 [PATCH] ASoC: sigmadsp: Fix missleading return value pascal.huerst
@ 2016-02-10 14:55 ` Lars-Peter Clausen
  2016-02-10 19:22 ` Applied "ASoC: sigmadsp: Fix missleading return value" to the asoc tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Lars-Peter Clausen @ 2016-02-10 14:55 UTC (permalink / raw)
  To: pascal.huerst; +Cc: alsa-devel

On 02/10/2016 03:51 PM, pascal.huerst@gmail.com wrote:
> From: Pascal Huerst <pascal.huerst@gmail.com>
> 
> Forwarding the return value of i2c_master_send, leads to errors
> later on, since i2c_master_send returns the number of bytes
> transmittet. Check for ret < 0 instead and return 0 otherwise.
> 
> Signed-off-by: Pascal Huerst <pascal.huerst@gmail.com>

Thanks.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Please resend to the ASoC maintainers otherwise it wont get picked up.

> ---
>  sound/soc/codecs/sigmadsp-i2c.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/sigmadsp-i2c.c b/sound/soc/codecs/sigmadsp-i2c.c
> index 21ca3a5..d374c18 100644
> --- a/sound/soc/codecs/sigmadsp-i2c.c
> +++ b/sound/soc/codecs/sigmadsp-i2c.c
> @@ -31,7 +31,10 @@ static int sigmadsp_write_i2c(void *control_data,
>  
>  	kfree(buf);
>  
> -	return ret;
> +	if (ret < 0)
> +		return ret;
> +
> +	return 0;
>  }
>  
>  static int sigmadsp_read_i2c(void *control_data,
> 

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

* Applied "ASoC: sigmadsp: Fix missleading return value" to the asoc tree
  2016-02-10 14:51 [PATCH] ASoC: sigmadsp: Fix missleading return value pascal.huerst
  2016-02-10 14:55 ` Lars-Peter Clausen
@ 2016-02-10 19:22 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2016-02-10 19:22 UTC (permalink / raw)
  To: Pascal Huerst, Lars-Peter Clausen, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: sigmadsp: Fix missleading return value

has been applied to the asoc tree at

   git://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 61c4a1ac4d900e743af0b363fe520405939eab47 Mon Sep 17 00:00:00 2001
From: Pascal Huerst <pascal.huerst@gmail.com>
Date: Wed, 10 Feb 2016 15:59:28 +0100
Subject: [PATCH] ASoC: sigmadsp: Fix missleading return value

Forwarding the return value of i2c_master_send, leads to errors
later on, since i2c_master_send returns the number of bytes
transmittet. Check for ret < 0 instead and return 0 otherwise.

Signed-off-by: Pascal Huerst <pascal.huerst@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/sigmadsp-i2c.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/sigmadsp-i2c.c b/sound/soc/codecs/sigmadsp-i2c.c
index 21ca3a5e9f66..d374c18d4db7 100644
--- a/sound/soc/codecs/sigmadsp-i2c.c
+++ b/sound/soc/codecs/sigmadsp-i2c.c
@@ -31,7 +31,10 @@ static int sigmadsp_write_i2c(void *control_data,
 
 	kfree(buf);
 
-	return ret;
+	if (ret < 0)
+		return ret;
+
+	return 0;
 }
 
 static int sigmadsp_read_i2c(void *control_data,
-- 
2.7.0

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

end of thread, other threads:[~2016-02-10 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-10 14:51 [PATCH] ASoC: sigmadsp: Fix missleading return value pascal.huerst
2016-02-10 14:55 ` Lars-Peter Clausen
2016-02-10 19:22 ` Applied "ASoC: sigmadsp: Fix missleading return value" to the asoc tree 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.