Re: [PATCH v2] watchdog: atcwdt200: fix return value when watchdog is enabled

Guenter Roeck <[email protected]> Thu, 23 Jul 2026 16:01:03 -0700
Newsgroups org.kernel.vger.linux-watchdog,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, Jul 23, 2026 at 07:56:34AM +0530, [email protected] wrote:
> From: Surendra Singh Chouhan <[email protected]>
> 
> atcwdt_get_int_timer_type() returned TMR_UNKNOWN (enum value 3) when
> CTRL_WDT_EN was set in the control register.
> 
> Because atcwdt_probe() checks "ret = atcwdt_get_int_timer_type(drv_data);
> if (ret) return ret;", returning TMR_UNKNOWN caused probe() to return 3
> instead of a valid negative error code.
> 
> Fix this by returning -EBUSY via dev_err_probe() when the watchdog is
> already enabled and update the kernel-doc description accordingly.
> 
> Fixes: e4e0848ad046 ("watchdog: atcwdt200: Add driver for Andes ATCWDT200")
> Signed-off-by: Surendra Singh Chouhan <[email protected]>

Applied. Next time please provide a change log.

Guenter