public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Do not update the cache if write to hardware failed
@ 2010-11-23  6:14 Axel Lin
  2010-11-23  7:39 ` Peter Ujfalusi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Axel Lin @ 2010-11-23  6:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, Peter Ujfalusi

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/tpa6130a2.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index bfef3da..2d64502 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -77,8 +77,10 @@ static int tpa6130a2_i2c_write(int reg, u8 value)
 
 	if (data->power_state) {
 		val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value);
-		if (val < 0)
+		if (val < 0) {
 			dev_err(&tpa6130a2_client->dev, "Write failed\n");
+			return val;
+		}
 	}
 
 	/* Either powered on or off, we save the context */
-- 
1.7.2




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

* Re: [PATCH] ASoC: Do not update the cache if write to hardware failed
  2010-11-23  6:14 [PATCH] ASoC: Do not update the cache if write to hardware failed Axel Lin
@ 2010-11-23  7:39 ` Peter Ujfalusi
  2010-11-23 10:24 ` Liam Girdwood
  2010-11-23 14:53 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2010-11-23  7:39 UTC (permalink / raw)
  To: ext Axel Lin
  Cc: linux-kernel, Liam Girdwood, Mark Brown,
	alsa-devel@alsa-project.org

On Tuesday 23 November 2010 08:14:07 ext Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/codecs/tpa6130a2.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
> index bfef3da..2d64502 100644
> --- a/sound/soc/codecs/tpa6130a2.c
> +++ b/sound/soc/codecs/tpa6130a2.c
> @@ -77,8 +77,10 @@ static int tpa6130a2_i2c_write(int reg, u8 value)
> 
>  	if (data->power_state) {
>  		val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value);
> -		if (val < 0)
> +		if (val < 0) {
>  			dev_err(&tpa6130a2_client->dev, "Write failed\n");
> +			return val;
> +		}
>  	}
> 
>  	/* Either powered on or off, we save the context */

Nice catch, thank you!

CC-ing alsa-devel

Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>

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

* Re: [PATCH] ASoC: Do not update the cache if write to hardware failed
  2010-11-23  6:14 [PATCH] ASoC: Do not update the cache if write to hardware failed Axel Lin
  2010-11-23  7:39 ` Peter Ujfalusi
@ 2010-11-23 10:24 ` Liam Girdwood
  2010-11-23 14:53 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2010-11-23 10:24 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Mark Brown, Peter Ujfalusi

On Tue, 2010-11-23 at 14:14 +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/codecs/tpa6130a2.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
> index bfef3da..2d64502 100644
> --- a/sound/soc/codecs/tpa6130a2.c
> +++ b/sound/soc/codecs/tpa6130a2.c
> @@ -77,8 +77,10 @@ static int tpa6130a2_i2c_write(int reg, u8 value)
>  
>  	if (data->power_state) {
>  		val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value);
> -		if (val < 0)
> +		if (val < 0) {
>  			dev_err(&tpa6130a2_client->dev, "Write failed\n");
> +			return val;
> +		}
>  	}
>  
>  	/* Either powered on or off, we save the context */

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk


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

* Re: [PATCH] ASoC: Do not update the cache if write to hardware failed
  2010-11-23  6:14 [PATCH] ASoC: Do not update the cache if write to hardware failed Axel Lin
  2010-11-23  7:39 ` Peter Ujfalusi
  2010-11-23 10:24 ` Liam Girdwood
@ 2010-11-23 14:53 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2010-11-23 14:53 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Liam Girdwood, Peter Ujfalusi

On Tue, Nov 23, 2010 at 02:14:07PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied, thanks.

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

end of thread, other threads:[~2010-11-23 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23  6:14 [PATCH] ASoC: Do not update the cache if write to hardware failed Axel Lin
2010-11-23  7:39 ` Peter Ujfalusi
2010-11-23 10:24 ` Liam Girdwood
2010-11-23 14:53 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox