public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] Staging: iio/dac/ad5064.c: signedness bug in ad5064_read_raw()
Date: Sun, 30 Oct 2011 10:44:39 +0000	[thread overview]
Message-ID: <4EAD2A97.8090103@metafoo.de> (raw)
In-Reply-To: <20111029072042.GC17780@elgon.mountain>

On 10/29/2011 09:20 AM, Dan Carpenter wrote:
> regulator_get_voltage() returns an int so "scale_uv" should be an
> int.  Making it unsigned here breaks the error handling.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

uhm, yes...

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks.

> 
> diff --git a/drivers/staging/iio/dac/ad5064.c b/drivers/staging/iio/dac/ad5064.c
> index 24279f2..3b14526 100644
> --- a/drivers/staging/iio/dac/ad5064.c
> +++ b/drivers/staging/iio/dac/ad5064.c
> @@ -280,8 +280,8 @@ static int ad5064_read_raw(struct iio_dev *indio_dev,
>  			   long m)
>  {
>  	struct ad5064_state *st = iio_priv(indio_dev);
> -	unsigned long scale_uv;
>  	unsigned int vref;
> +	int scale_uv;
>  
>  	switch (m) {
>  	case 0:


  reply	other threads:[~2011-10-30 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29  7:20 [patch] Staging: iio/dac/ad5064.c: signedness bug in Dan Carpenter
2011-10-30 10:44 ` Lars-Peter Clausen [this message]
2011-10-31 11:22   ` [patch] Staging: iio/dac/ad5064.c: signedness bug in ad5064_read_raw() Jonathan Cameron

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=4EAD2A97.8090103@metafoo.de \
    --to=lars@metafoo.de \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=jic23@cam.ac.uk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-iio@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