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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250314152939.2759573-5-serghox@gmail.com>
Date: Fri, 14 Mar 2025 18:29:25 +0300
From: Sergey Khimich <serghox@...il.com>
To: linux-media@...r.kernel.org
Cc: Philipp Zabel <p.zabel@...gutronix.de>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	linux-kernel@...r.kernel.org,
	Vladimir Yakovlev <vovchkir@...il.com>,
	Maksim Turok <turok.m7@...il.com>
Subject: [PATCH 04/18] media: coda: Add check result after reset

From: Vladimir Yakovlev <vovchkir@...il.com>

Check result after reset IP block and disable all clocks if return
error.

Co-developed-by: Sergey Khimich <serghox@...il.com>
Signed-off-by: Sergey Khimich <serghox@...il.com>
Signed-off-by: Vladimir Yakovlev <vovchkir@...il.com>
---
 drivers/media/platform/chips-media/coda/coda-common.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c
index c39ba4fba547..64ba17d8adfb 100644
--- a/drivers/media/platform/chips-media/coda/coda-common.c
+++ b/drivers/media/platform/chips-media/coda/coda-common.c
@@ -2793,7 +2793,9 @@ static int coda_hw_init(struct coda_dev *dev)
 	if (ret)
 		goto err_clk_ahb;
 
-	reset_control_reset(dev->rstc);
+	ret = reset_control_reset(dev->rstc);
+	if (ret)
+		goto err_reset;
 
 	/*
 	 * Copy the first CODA_ISRAM_SIZE in the internal SRAM.
@@ -2872,6 +2874,8 @@ static int coda_hw_init(struct coda_dev *dev)
 
 	return 0;
 
+err_reset:
+	clk_disable_unprepare(dev->clk_ahb);
 err_clk_ahb:
 	clk_disable_unprepare(dev->clk_per);
 err_clk_per:
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ