Skip to content

watchdog: sama5d4: fix IRQ and timeout bugs, use platform_get_irq_optional

Rosen Penev linux-arm-kernel linux-watchdog lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 4 repliesIn review
  2. v12 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3watchdog: sama5d4: fix shared IRQ and hardcoded timeout issuesdrivers/watchdog/sama5d4_wdt.c+10 -91 reply
2/3watchdog: sama5d4: use platform_get_irq_optional()drivers/watchdog/sama5d4_wdt.c+6 -41 reply
3/3watchdog: sama5d4: fix NULL deref in irq handlerdrivers/watchdog/sama5d4_wdt.c+1 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCHv2 0/3] watchdog: sama5d4: fix IRQ and timeout bugs, use platform_get_irq_optional

This series fixes three issues in the sama5d4 watchdog driver:

Patch 1: Return IRQ_NONE when the status register indicates no watchdog interrupt is pending, and pass the configured timeout (not the hardcoded default) to sama5d4_wdt_init().

Patch 2: Replace irq_of_parse_and_map() with platform_get_irq_optional() for simpler error handling and EPROBE_DEFER support.

Patch 3: Move platform_set_drvdata() before devm_request_irq() to prevent a NULL pointer dereference in the interrupt handler if the shared System IRQ fires immediately after registration.

v2: address sashiko review

Rosen Penev (3):
watchdog: sama5d4: fix shared IRQ and hardcoded timeout issues
watchdog: sama5d4: use platform_get_irq_optional()
watchdog: sama5d4: fix NULL deref in irq handler

 drivers/watchdog/sama5d4_wdt.c | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

--
2.54.0