Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: rzg2l_wdt: Add error check for reset_control_deassert

If reset_control_deassert() fails, then we won't be able to
access the device registers. Therefore check the return code of
reset_control_deassert() and bailout in case of error.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220225175320.11041-6-biju.das.jz@bp.renesas.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Biju Das and committed by
Wim Van Sebroeck
baf1aace 33d04d0f

+4 -1
+4 -1
drivers/watchdog/rzg2l_wdt.c
··· 203 203 return dev_err_probe(&pdev->dev, PTR_ERR(priv->rstc), 204 204 "failed to get cpg reset"); 205 205 206 - reset_control_deassert(priv->rstc); 206 + ret = reset_control_deassert(priv->rstc); 207 + if (ret) 208 + return dev_err_probe(dev, ret, "failed to deassert"); 209 + 207 210 pm_runtime_enable(&pdev->dev); 208 211 209 212 priv->wdev.info = &rzg2l_wdt_ident;