Skip to content

Commit 900b938

Browse files
claudiubezneaWim Van Sebroeck
authored andcommitted
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>
1 parent 064319c commit 900b938

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/watchdog/rzg2l_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ static int rzg2l_wdt_probe(struct platform_device *pdev)
318318

319319
watchdog_set_drvdata(&priv->wdev, priv);
320320
ret = devm_add_action_or_reset(&pdev->dev, rzg2l_wdt_pm_disable, &priv->wdev);
321-
if (ret < 0)
321+
if (ret)
322322
return ret;
323323

324324
watchdog_set_nowayout(&priv->wdev, nowayout);

0 commit comments

Comments
 (0)