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. -- 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