Linux Watchdog driver development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: phucduc.bui@gmail.com
Cc: linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 1/2] watchdog: orion_wdt: Propagate -EPROBE_DEFER from IRQ lookup
Date: Thu, 06 Aug 2026 06:35:36 +0000	[thread overview]
Message-ID: <20260806063537.384B81F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260806062812.26523-1-phucduc.bui@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Returning -EPROBE_DEFER directly leaks the clock reference and enable count by bypassing the cleanup path.
--

--- Patch [1]: [PATCH 1/2] watchdog: orion_wdt: Propagate -EPROBE_DEFER from IRQ lookup ---
commit 0ad8e477efab703bb8fdf2177c651643b3096974
Author: bui duc phuc <phucduc.bui@gmail.com>

watchdog: orion_wdt: Propagate -EPROBE_DEFER from IRQ lookup

This commit propagates -EPROBE_DEFER from platform_get_irq_optional() so
the driver is re-probed when the interrupt resource becomes available
instead of continuing without an IRQ.

> diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
> index 1802634cc7cda..c132533b997d0 100644
> --- a/drivers/watchdog/orion_wdt.c
> +++ b/drivers/watchdog/orion_wdt.c
> @@ -606,6 +606,8 @@ static int orion_wdt_probe(struct platform_device *pdev)
>  
>  	/* Request the IRQ only after the watchdog is disabled */
>  	irq = platform_get_irq_optional(pdev, 0);
> +	if (irq == -EPROBE_DEFER)
> +		return irq;

[Severity: High]
Does this direct return leak the clock reference and enable count?

Since dev->data->clock_init() was called earlier in orion_wdt_probe(),
would setting ret = irq and jumping to the disable_clk label ensure that
clk_disable_unprepare() and clk_put() are correctly called on probe deferral?

>  	if (irq > 0) {
>  		/*
>  		 * Not all supported platforms specify an interrupt for the

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260806062812.26523-1-phucduc.bui@gmail.com?part=1

  parent reply	other threads:[~2026-08-06  6:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  6:28 [PATCH 1/2] watchdog: orion_wdt: Propagate -EPROBE_DEFER from IRQ lookup phucduc.bui
2026-08-06  6:28 ` [PATCH 2/2] watchdog: stm32_iwdg: " phucduc.bui
2026-08-06  6:40   ` sashiko-bot
2026-08-06  9:35   ` Guenter Roeck
2026-08-07  4:23     ` Bui Duc Phuc
2026-08-06  6:35 ` sashiko-bot [this message]
2026-08-06  9:30 ` [PATCH 1/2] watchdog: orion_wdt: " Guenter Roeck
2026-08-07  4:20   ` Bui Duc Phuc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260806063537.384B81F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=phucduc.bui@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox