Re: [PATCH v2] watchdog: atcwdt200: fix return value when watchdog is enabled
From: Guenter Roeck
Date: Thu Jul 23 2026 - 19:03:21 EST
On Thu, Jul 23, 2026 at 07:56:34AM +0530, kr494167@xxxxxxxxx wrote:
> From: Surendra Singh Chouhan <kr494167@xxxxxxxxx>
>
> 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 <kr494167@xxxxxxxxx>
Applied. Next time please provide a change log.
Guenter