Re: [PATCH 1/5] iio: adc: vf610: Propagate the real error when platform_get_irq() fails

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

 



On 04/10/14 19:46, Fabio Estevam wrote:
> On Sat, Oct 4, 2014 at 8:26 AM, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>> On 03/10/14 02:25, Fabio Estevam wrote:
>>> From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
>>>
>>> There is no need to pass a 'fake' return value when platform_get_irq() fails.
>>>
>>> Propagate the real error instead.
>>>
>>> While at it, only consider negative numbers returned by platform_get_irq()
>>> as error.
>> Returning an irq of 0 is still invalid isn't it?
>> (there was a lot of 'fun' making this true for Arm a few years back).
>> Doesn't it effectively mean no irq is present?
> 
> In practice I cannot see how platform_get_irq() could return 0. Only
> if the dtsi was providing 0 as the irq number for the vf610-adc
> driver, which would mean a very broken dtsi.
> 
> This driver is used only by vf610 and imx6sx and their dtsi provide
> the correct values for the adc irq.
> 
> This type of check:
> 
>        if (irq < 0)
>                return irq;
> 
> is commonly used on the imx drivers and I was not aware of any
> problems in this regard.
Fair enough.
> --
> 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
> 
--
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