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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220327171916.5d6c7b18@jic23-huawei>
Date:   Sun, 27 Mar 2022 17:19:16 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Paul Cercueil <paul@...pouillou.net>
Cc:     Zizhuang Deng <sunsetdzz@...il.com>, Jonathan.Cameron@...wei.com,
        linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
        Paul Cercueil <paul.cercueil@...log.com>
Subject: Re: [PATCH] iio: dac: ad5592r: Fix the missing return value.

On Mon, 21 Mar 2022 09:28:36 +0000
Paul Cercueil <paul@...pouillou.net> wrote:

> Hi,
> 
> 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.
> >> 
> >>  Signed-off-by: Zizhuang Deng <sunsetdzz@...il.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;
> >>   	}  
> >   
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ