public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0
Date: Wed, 14 Aug 2013 14:06:32 +0000	[thread overview]
Message-ID: <520B8EE8.5050703@roeck-us.net> (raw)
In-Reply-To: <20130814094526.GE521@elgon.mountain>

On 08/14/2013 03:53 AM, Dan Carpenter wrote:
> On Wed, Aug 14, 2013 at 12:45:26PM +0300, Dan Carpenter wrote:
>> The callers never check for negative but they sometimes check for zero
>> returns:
>>
>> 	int reg = ADT7462_REG_VOLT_MAX(data, i);
>>          data->volt_max[i] >> 		(reg ? i2c_smbus_read_byte_data(client, reg) : 0);
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> ---
>> Static checker stuff.  I don't have this hardware.
>
> I should have also said that not all the callers check for error.
> I don't know if that is a problem.
>

It is undesirable, but would be much more complex to fix.
So your patch is the sensible approach to take care of the
immediate problem, and we can leave the fancy solution to
someone with enough time at hand.

I'll apply it to -next.

Thanks,
Guenter


      parent reply	other threads:[~2013-08-14 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14  9:45 [patch] hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0 Dan Carpenter
2013-08-14 10:53 ` Dan Carpenter
2013-08-14 14:06 ` Guenter Roeck [this message]

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=520B8EE8.5050703@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=kernel-janitors@vger.kernel.org \
    /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