From: Jonathan Cameron <jic23@kernel.org>
To: Paul Cercueil <paul@crapouillou.net>
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: Sun, 27 Mar 2022 17:19:16 +0100 [thread overview]
Message-ID: <20220327171916.5d6c7b18@jic23-huawei> (raw)
In-Reply-To: <OZ839R.NWJC2LY54LGX@crapouillou.net>
On Mon, 21 Mar 2022 09:28:36 +0000
Paul Cercueil <paul@crapouillou.net> wrote:
> 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.
Added a fixes tag (it was driver introduction) and marked for stable
given this could have some weird side effects if anyone actually
had a dt that hit this path. Applied to the fixes-togreg branch of iio.git
but not pushed out yet as I'll be rebasing that branch on rc1 next week.
Thanks,
Jonathan
>
> 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;
> >> }
> >
>
>
next prev parent reply other threads:[~2022-03-27 16:11 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
2022-03-27 16:19 ` Jonathan Cameron [this message]
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=20220327171916.5d6c7b18@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.cercueil@analog.com \
--cc=paul@crapouillou.net \
--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