[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171119113416.377957d0@archlinux>
Date: Sun, 19 Nov 2017 11:34:16 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Tony Lindgren <tony@...mide.com>
Cc: Sebastian Reichel <sre@...nel.org>, Pan Bian <bianpan2016@....com>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Rob Herring <robh@...nel.org>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: cpcap: fix incorrect validation
On Mon, 13 Nov 2017 10:49:03 -0800
Tony Lindgren <tony@...mide.com> wrote:
> * Sebastian Reichel <sre@...nel.org> [171112 18:30]:
> > Hi,
> >
> > On Mon, Nov 13, 2017 at 12:01:20AM +0800, Pan Bian wrote:
> > > Function platform_get_irq_byname() returns a negative error code on
> > > failure, and a zero or positive number on success. However, in function
> > > cpcap_adc_probe(), positive IRQ numbers are also taken as error cases.
> > > Use "if (ddata->irq < 0)" instead of "if (!ddata->irq)" to validate the
> > > return value of platform_get_irq_byname().
> > >
> > > Signed-off-by: Pan Bian <bianpan2016@....com>
> > > ---
> >
> > Reviewed-by: Sebastian Reichel <sebastian.reichel@...labora.co.uk>
>
> Acked-by: Tony Lindgren <tony@...mide.com>
Applied to the fixes-togreg branch of iio.git.
Thanks,
Jonathan
Powered by blists - more mailing lists