Re: [PATCH] iio: adc: cpcap: fix incorrect validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 13 Nov 2017 10:49:03 -0800
Tony Lindgren <tony@xxxxxxxxxxx> wrote:

> * Sebastian Reichel <sre@xxxxxxxxxx> [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@xxxxxxx>
> > > ---  
> > 
> > Reviewed-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxxxx>  
> 
> Acked-by: Tony Lindgren <tony@xxxxxxxxxxx>

Applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux