lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VdFPfWAbhysdr8gRuJPeGc2O5Vm8W3E6+EQ5kPynVnM-w@mail.gmail.com>
Date:   Sun, 27 Mar 2022 22:52:37 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Paul Cercueil <paul@...pouillou.net>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        Zizhuang Deng <sunsetdzz@...il.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Paul Cercueil <paul.cercueil@...log.com>
Subject: Re: [PATCH] iio: dac: ad5592r: Fix the missing return value.

On Mon, Mar 21, 2022 at 11:34 AM Paul Cercueil <paul@...pouillou.net> wrote:
> Le dim., mars 20 2022 at 15:20:47 +0000, Jonathan Cameron
> <jic23@...nel.org> a écrit :
> > On Thu, 10 Mar 2022 20:54:50 +0800
> > Zizhuang Deng <sunsetdzz@...il.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.

> > 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.

Basically the question here is what value should offstate have when
there is no such property. Currently it's the same value as modes (no
seeing context other than in the patch).

> >>              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;


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ