[PATCH 0/3] Handle optional IRQs correctly

phucduc.bui at gmail.com phucduc.bui at gmail.com
Thu Aug 13 01:52:10 PDT 2026


From: bui duc phuc <phucduc.bui at gmail.com>

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




More information about the linux-arm-kernel mailing list