[PATCH 0/3] Handle optional IRQs correctly

[email protected]
Newsgroups gmane.linux.drivers.i2c,gmane.linux.ports.arm.kernel,gmane.linux.kernel
Message-ID <[email protected]>
From: bui duc phuc <[email protected]>

Hi all,

The changes were found through code inspection while reviewing optional
IRQ handling in I2C drivers.

I noticed that some drivers already handle the return value of
platform_get_irq_optional() explicitly, including i2c-designware-platdrv,
i2c-ocores, and i2c-sh_mobile.

This series updates the affected drivers to properly handle errors from
platform_get_irq_optional() and distinguish a missing optional IRQ from
other errors.

The series also fixes the handling of IRQ 0 in the brcmstb driver, since
0 is not a valid IRQ number returned by platform_get_irq_optional().

The series was only compile-tested.

Best regards,
Phuc

bui duc phuc (3):
  i2c: pca-platform: Handle errors from optional IRQ lookup
  i2c: brcmstb: Handle errors from optional IRQ lookup
  i2c: brcmstb: Correct optional IRQ handling

 drivers/i2c/busses/i2c-brcmstb.c      | 6 ++++--
 drivers/i2c/busses/i2c-pca-platform.c | 5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.