Re: [PATCH v2 2/2] i2c: i2c-smbus: fwnode_irq_get_byname() return value fix

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

 



On Tue, Oct 25, 2022 at 06:12:11PM +0300, Matti Vaittinen wrote:
> The fwnode_irq_get_byname() was changed to not return 0 upon failure so
> return value check can be adjusted to reflect the change.

...

> Depends on the mentioned return value change which is in patch 1/2. The
> return value change does also cause a functional change here. Eg. when
> IRQ mapping fails, the fwnode_irq_get_byname() no longer returns zero.
> This will cause also the probe here to return nonzero failure. I guess
> this is desired behaviour.

The entire error handling there looks suspicious.

The 'struct i2c_smbus_alert_setup' description says:

 "If irq is not specified, the smbus_alert driver doesn't take care of
  interrupt handling. In that case it is up to the I2C bus driver to
  either handle the interrupts or to poll for alerts."

So, the question is, shouldn't we just drop the check completely?

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux