From: sashiko-bot@kernel.org
To: "Primoz Fiser" <primoz.fiser@norik.com>
Cc: devicetree@vger.kernel.org, mfd@lists.linux.dev, lee@kernel.org,
conor+dt@kernel.org, linux-watchdog@vger.kernel.org,
Frank.Li@kernel.org, imx@lists.linux.dev, robh@kernel.org
Subject: Re: [PATCH 3/4] watchdog: da9062: reset board on watchdog timeout
Date: Wed, 23 Sep 2026 11:25:53 +0000 [thread overview]
Message-ID: <20260923112553.988BB1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923111719.2032012-4-primoz.fiser@norik.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] watchdog: da9062: ignored regmap_update_bits error during probe
--
commit bb521fc9765eec74ebb6a0d926ce1286dabd2490
Author: Andrej Picej <andrej.picej@norik.com>
watchdog: da9062: reset board on watchdog timeout
This commit introduces a method to change the watchdog timeout configuration
based on the "dlg,wdt-sd" DT binding in the da9062 watchdog driver. It allows
switching between SHUTDOWN mode and POWERDOWN mode on watchdog timeout. If
the DT binding is absent, it retains the default behavior.
> diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
> index 426962547df16..2a9da83493b38 100644
> --- a/drivers/watchdog/da9062_wdt.c
> +++ b/drivers/watchdog/da9062_wdt.c
[ ... ]
> @@ -245,6 +248,30 @@ static int da9062_wdt_probe(struct platform_device *pdev)
[ ... ]
> + ret = regmap_update_bits(wdt->hw->regmap,
> + DA9062AA_CONFIG_I,
> + DA9062AA_WATCHDOG_SD_MASK,
> + mask);
> +
> + if (ret)
> + dev_err(dev, "failed to set wdt reset mode: %d\n",
> + ret);
> + }
> +
> return devm_watchdog_register_device(dev, &wdt->wdtdev);
[Severity: Medium]
Is the regmap_update_bits() error code intentionally ignored here?
When the device tree contains the "dlg,wdt-sd" property, da9062_wdt_probe()
attempts to update the DA9062AA_CONFIG_I register. If this transaction fails
(for example, returning -EIO due to a hardware fault), the failure is logged
via dev_err(), but the error code in 'ret' is then discarded because execution
falls through to devm_watchdog_register_device().
This could leave the watchdog in an incorrect reset mode that conflicts with
the explicit configuration requested by the device tree. Should the function
return 'ret' early upon failure, instead of continuing probe?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923111719.2032012-1-primoz.fiser@norik.com?part=3
next prev parent reply other threads:[~2026-09-23 11:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 11:17 [PATCH 0/4] da9062/da9061 watchdog timeout mode Primoz Fiser
2026-09-23 11:17 ` [PATCH 1/4] mfd: da9062: make register CONFIG_I writable Primoz Fiser
2026-09-23 11:25 ` sashiko-bot
2026-09-23 11:17 ` [PATCH 2/4] mfd: da9061: " Primoz Fiser
2026-09-23 11:23 ` sashiko-bot
2026-09-23 11:17 ` [PATCH 3/4] watchdog: da9062: reset board on watchdog timeout Primoz Fiser
2026-09-23 11:25 ` sashiko-bot [this message]
2026-09-23 21:01 ` Guenter Roeck
2026-09-23 21:03 ` Guenter Roeck
2026-09-23 11:17 ` [PATCH 4/4] ARM: dts: imx6: phycore-som: set watchdog timeout mode to shutdown Primoz Fiser
2026-09-23 11:23 ` sashiko-bot
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=20260923112553.988BB1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=lee@kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=primoz.fiser@norik.com \
--cc=robh@kernel.org \
--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