mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: ext Axel Lin <axel.lin@gmail.com>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>,
	Liam Girdwood <lrg@slimlogic.co.uk>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] ASoC: Do not update the cache if write to hardware failed
Date: Tue, 23 Nov 2010 09:39:16 +0200	[thread overview]
Message-ID: <201011230939.17080.peter.ujfalusi@nokia.com> (raw)
In-Reply-To: <1290492847.7286.1.camel@mola>

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>

  reply	other threads:[~2010-11-23  7:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23  6:14 Axel Lin
2010-11-23  7:39 ` Peter Ujfalusi [this message]
2010-11-23 10:24 ` Liam Girdwood
2010-11-23 14:53 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201011230939.17080.peter.ujfalusi@nokia.com \
    --to=peter.ujfalusi@nokia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=axel.lin@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome