All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: pascal.huerst@gmail.com
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: sigmadsp: Fix missleading return value
Date: Wed, 10 Feb 2016 15:55:57 +0100	[thread overview]
Message-ID: <56BB4F7D.5010102@metafoo.de> (raw)
In-Reply-To: <1455115890-23127-1-git-send-email-pascal.huerst@gmail.com>

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,
> 

  reply	other threads:[~2016-02-10 14:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 14:51 [PATCH] ASoC: sigmadsp: Fix missleading return value pascal.huerst
2016-02-10 14:55 ` Lars-Peter Clausen [this message]
2016-02-10 19:22 ` Applied "ASoC: sigmadsp: Fix missleading return value" to the asoc tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2016-02-10 14:59 [PATCH] ASoC: sigmadsp: Fix missleading return value pascal.huerst
2016-02-10 15:02 ` Lars-Peter Clausen

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=56BB4F7D.5010102@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=pascal.huerst@gmail.com \
    /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 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.