public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Zizhuang Deng <sunsetdzz@gmail.com>,
	Jonathan.Cameron@huawei.com, linux-kernel@vger.kernel.org,
	linux-iio@vger.kernel.org,
	Paul Cercueil <paul.cercueil@analog.com>
Subject: Re: [PATCH] iio: dac: ad5592r: Fix the missing return value.
Date: Mon, 21 Mar 2022 09:28:36 +0000	[thread overview]
Message-ID: <OZ839R.NWJC2LY54LGX@crapouillou.net> (raw)
In-Reply-To: <20220320152047.2a04a62e@jic23-huawei>

Hi,

Le dim., mars 20 2022 at 15:20:47 +0000, Jonathan Cameron 
<jic23@kernel.org> a écrit :
> On Thu, 10 Mar 2022 20:54:50 +0800
> Zizhuang Deng <sunsetdzz@gmail.com> wrote:
> 
>>  The third call to `fwnode_property_read_u32` did not record
>>  the return value, resulting in `channel_offstate` possibly
>>  being assigned the wrong value.
>> 
>>  Signed-off-by: Zizhuang Deng <sunsetdzz@gmail.com>
> Hi,
> 
> Definitely rather odd looking and I think your conclusion is correct.
> +CC Paul for confirmation that this isn't doing something clever..

It's been a while, but I don't think there was anything clever going on 
here - so the patch is fine.

Cheers,
-Paul

> 
>>  ---
>>   drivers/iio/dac/ad5592r-base.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>>  diff --git a/drivers/iio/dac/ad5592r-base.c 
>> b/drivers/iio/dac/ad5592r-base.c
>>  index a424b7220b61..4434c1b2a322 100644
>>  --- a/drivers/iio/dac/ad5592r-base.c
>>  +++ b/drivers/iio/dac/ad5592r-base.c
>>  @@ -522,7 +522,7 @@ static int ad5592r_alloc_channels(struct 
>> iio_dev *iio_dev)
>>   		if (!ret)
>>   			st->channel_modes[reg] = tmp;
>> 
>>  -		fwnode_property_read_u32(child, "adi,off-state", &tmp);
>>  +		ret = fwnode_property_read_u32(child, "adi,off-state", &tmp);
>>   		if (!ret)
>>   			st->channel_offstate[reg] = tmp;
>>   	}
> 



  reply	other threads:[~2022-03-21  9:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 12:54 [PATCH] iio: dac: ad5592r: Fix the missing return value Zizhuang Deng
2022-03-20 15:20 ` Jonathan Cameron
2022-03-21  9:28   ` Paul Cercueil [this message]
2022-03-27 16:19     ` Jonathan Cameron
2022-03-27 19:52     ` Andy Shevchenko

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=OZ839R.NWJC2LY54LGX@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.cercueil@analog.com \
    --cc=sunsetdzz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox