summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>2024-05-31 09:57:20 +0300
committerWim Van Sebroeck <wim@linux-watchdog.org>2024-07-10 21:01:33 +0300
commit900b938335f7fbd401dcba14c8069dbf38ed1f28 (patch)
tree363b67405080e8d0abdd2c74673a6ff1a1d5c952 /drivers/watchdog
parent064319c3fac88e04f53f3460cd24ae90de2d9fb6 (diff)
downloadlinux-900b938335f7fbd401dcba14c8069dbf38ed1f28.tar.xz
watchdog: rzg2l_wdt: Remove comparison with zero
devm_add_action_or_reset() could return -ENOMEM or zero. Thus, remove comparison with zero of the returning value to make code simpler. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20240531065723.1085423-7-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/rzg2l_wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c
index 7aad66da138a..1f013dfd3c97 100644
--- a/drivers/watchdog/rzg2l_wdt.c
+++ b/drivers/watchdog/rzg2l_wdt.c
@@ -318,7 +318,7 @@ static int rzg2l_wdt_probe(struct platform_device *pdev)
watchdog_set_drvdata(&priv->wdev, priv);
ret = devm_add_action_or_reset(&pdev->dev, rzg2l_wdt_pm_disable, &priv->wdev);
- if (ret < 0)
+ if (ret)
return ret;
watchdog_set_nowayout(&priv->wdev, nowayout);