public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Mihail Chindris <mihail.chindris@analog.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio: dac: ad3552r: fix signedness bug in ad3552r_reset()
Date: Sat, 19 Mar 2022 18:25:55 +0000	[thread overview]
Message-ID: <20220319182555.73aaa20a@jic23-huawei> (raw)
In-Reply-To: <20220316122354.GA16825@kili>

On Wed, 16 Mar 2022 15:23:54 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> The "val" variable is used to store either negative error codes from
> ad3552r_read_reg_wrapper() or positive u16 values on success.  It needs
> to be signed for the error handling to work correctly.
> 
> Fixes: 8f2b54824b28 ("drivers:iio:dac: Add AD3552R driver support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied to the fixes-togreg branch of iio.git, but I won't be pushing it
out publicly until I have rebased that tree on rc1 as it may make a mess
of ordering in linux-next

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ad3552r.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad3552r.c b/drivers/iio/dac/ad3552r.c
> index 97f13c0b9631..e0a93b27e0e8 100644
> --- a/drivers/iio/dac/ad3552r.c
> +++ b/drivers/iio/dac/ad3552r.c
> @@ -656,7 +656,7 @@ static int ad3552r_reset(struct ad3552r_desc *dac)
>  {
>  	struct reg_addr_pool addr;
>  	int ret;
> -	u16 val;
> +	int val;
>  
>  	dac->gpio_reset = devm_gpiod_get_optional(&dac->spi->dev, "reset",
>  						  GPIOD_OUT_LOW);


      reply	other threads:[~2022-03-19 18:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 12:23 [PATCH] iio: dac: ad3552r: fix signedness bug in ad3552r_reset() Dan Carpenter
2022-03-19 18:25 ` Jonathan Cameron [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=20220319182555.73aaa20a@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=mihail.chindris@analog.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