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]
Date:   Tue, 24 Oct 2023 16:09:16 +0300
From:   Denis Arefev <arefev@...mel.ru>
To:     Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        lvc-project@...uxtesting.org
Subject: [PATCH] media: marvell: Added function return value check clk_prepare

	Return value of function 'clk_prepare', called at mcam-core.c:905,
	is not checked, but it is usually checked for this function.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Denis Arefev <arefev@...mel.ru>
---
 drivers/media/platform/marvell/mcam-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/marvell/mcam-core.c b/drivers/media/platform/marvell/mcam-core.c
index 66688b4aece5..afb7f4009d96 100644
--- a/drivers/media/platform/marvell/mcam-core.c
+++ b/drivers/media/platform/marvell/mcam-core.c
@@ -901,9 +901,10 @@ static void mcam_ctlr_power_down(struct mcam_camera *cam)
 static int mclk_prepare(struct clk_hw *hw)
 {
 	struct mcam_camera *cam = container_of(hw, struct mcam_camera, mclk_hw);
-
-	clk_prepare(cam->clk[0]);
-	return 0;
+	int ret;
+
+	ret = clk_prepare(cam->clk[0]);
+	return ret;
 }
 
 static void mclk_unprepare(struct clk_hw *hw)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ