[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220419181104.484667-4-sashal@kernel.org>
Date: Tue, 19 Apr 2022 14:10:31 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Biju Das <biju.das.jz@...renesas.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH AUTOSEL 5.17 04/34] reset: renesas: Check return value of reset_control_deassert()
From: Heiner Kallweit <hkallweit1@...il.com>
[ Upstream commit da18980a855edf44270f05455e0ec3f2472f64cc ]
Deasserting the reset is vital, therefore bail out in case of error.
Suggested-by: Biju Das <biju.das.jz@...renesas.com>
Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
Reviewed-by: Biju Das <biju.das.jz@...renesas.com>
Link: https://lore.kernel.org/r/b2131908-0110-006b-862f-080517f3e2d8@gmail.com
Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/reset/reset-rzg2l-usbphy-ctrl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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;
--
2.35.1
Powered by blists - more mailing lists