lkml.org 
[lkml]   [2017]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] iio: adc: cpcap: fix incorrect validation
* Sebastian Reichel <sre@kernel.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@163.com>
> > ---
>
> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

Acked-by: Tony Lindgren <tony@atomide.com>

\
 
 \ /
  Last update: 2017-11-13 19:50    [W:0.101 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site