lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240321114201.359381-1-prabhakar.mahadev-lad.rj@bp.renesas.com>
Date: Thu, 21 Mar 2024 11:42:01 +0000
From: Prabhakar <prabhakar.csengg@...il.com>
To: Philipp Zabel <p.zabel@...gutronix.de>,
	Biju Das <biju.das.jz@...renesas.com>,
	Geert Uytterhoeven <geert+renesas@...der.be>
Cc: linux-kernel@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org,
	Prabhakar <prabhakar.csengg@...il.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: [PATCH] reset: reset-rzg2l-usbphy-ctrl: Ensure reset line is asserted in error path

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>

In the event of failure during devm_reset_controller_register(), ensure
that the reset line is asserted back.

Fixes: bee08559701fb ("reset: renesas: Add RZ/G2L usbphy control driver")
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
---
 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 a8dde4606360..43eb01105596 100644
--- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
+++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
@@ -132,8 +132,10 @@ static int rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
 	priv->rcdev.dev = dev;
 
 	error = devm_reset_controller_register(dev, &priv->rcdev);
-	if (error)
+	if (error) {
+		reset_control_assert(priv->rstc);
 		return error;
+	}
 
 	spin_lock_init(&priv->lock);
 	dev_set_drvdata(dev, priv);
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ