diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2021-12-15 11:25:46 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2022-04-04 11:00:27 +0200 |
commit | da18980a855edf44270f05455e0ec3f2472f64cc (patch) | |
tree | f7aac5ccefb4d136c11988c6e68036da00299ac9 /drivers/reset/reset-rzg2l-usbphy-ctrl.c | |
parent | 8362f5217bc69c3cd30da73cd2d2ae3af4cc8117 (diff) | |
download | lwn-da18980a855edf44270f05455e0ec3f2472f64cc.tar.gz lwn-da18980a855edf44270f05455e0ec3f2472f64cc.zip |
reset: renesas: Check return value of reset_control_deassert()
Deasserting the reset is vital, therefore bail out in case of error.
Suggested-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/b2131908-0110-006b-862f-080517f3e2d8@gmail.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/reset/reset-rzg2l-usbphy-ctrl.c')
-rw-r--r-- | drivers/reset/reset-rzg2l-usbphy-ctrl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c index 1e8315038850..a8dde4606360 100644 --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c @@ -121,7 +121,9 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(priv->rstc), "failed to get reset\n"); - reset_control_deassert(priv->rstc); + error = reset_control_deassert(priv->rstc); + if (error) + return error; priv->rcdev.ops = &rzg2l_usbphy_ctrl_reset_ops; priv->rcdev.of_reset_n_cells = 1; |