]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
watchdog: rzg2l_wdt: Remove comparison with zero
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Fri, 31 May 2024 06:57:20 +0000 (09:57 +0300)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Wed, 10 Jul 2024 18:01:33 +0000 (20:01 +0200)
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>
drivers/watchdog/rzg2l_wdt.c

index 7aad66da138a890f75e090b346a91cd37233e4cb..1f013dfd3c974ed1428e6877ed30f6dcdc1e009b 100644 (file)
@@ -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);