mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 1/2 RESEND] regulator: lp3971 - remove unnecessary ret value checking in lp3971_i2c_write()
Date: Mon, 09 Aug 2010 09:23:31 +0100	[thread overview]
Message-ID: <1281342211.3035.1.camel@odin> (raw)
In-Reply-To: <1281053354.12131.4.camel@mola>

On Fri, 2010-08-06 at 08:09 +0800, Axel Lin wrote:
> We already check count value before calling i2c_smbus_read_byte_data(),
> no need to check it again.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> This resend adds regulator: prefix in the subject line.
> 
>  drivers/regulator/lp3971.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
> index d4d9822..3bb82b6 100644
> --- a/drivers/regulator/lp3971.c
> +++ b/drivers/regulator/lp3971.c
> @@ -377,7 +377,7 @@ static int lp3971_i2c_read(struct i2c_client *i2c, char reg, int count,
>  	if (count != 1)
>  		return -EIO;
>  	ret = i2c_smbus_read_byte_data(i2c, reg);
> -	if (ret < 0 || count != 1)
> +	if (ret < 0)
>  		return -EIO;
>  
>  	*dest = ret;

Applied 1/2 only as 2/2 is the same patch.

Thanks

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk


  reply	other threads:[~2010-08-09  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06  0:09 Axel Lin
2010-08-09  8:23 ` Liam Girdwood [this message]
2010-08-09  8:59   ` Axel Lin

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=1281342211.3035.1.camel@odin \
    --to=lrg@slimlogic.co.uk \
    --cc=axel.lin@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®