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: <20250124170009.2075175-1-mordan@ispras.ru>
Date: Fri, 24 Jan 2025 20:00:09 +0300
From: Vitalii Mordan <mordan@...ras.ru>
To: Andrzej Hajda <andrzej.hajda@...el.com>
Cc: Vitalii Mordan <mordan@...ras.ru>,
	Neil Armstrong <neil.armstrong@...aro.org>,
	Robert Foss <rfoss@...nel.org>,
	Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
	Jonas Karlman <jonas@...boo.se>,
	Jernej Skrabec <jernej.skrabec@...il.com>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>,
	Simona Vetter <simona@...ll.ch>,
	Jani Nikula <jani.nikula@...el.com>,
	Sui Jingfeng <sui.jingfeng@...ux.dev>,
	Aleksandr Mishin <amishin@...rgos.ru>,
	Tomi Valkeinen <tomi.valkeinen@...com>,
	Quentin Schulz <quentin.schulz@...e-electrons.com>,
	Yuti Amonkar <yamonkar@...ence.com>,
	Jyri Sarha <jsarha@...com>,
	Swapnil Jakhade <sjakhade@...ence.com>,
	dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org,
	Fedor Pchelkin <pchelkin@...ras.ru>,
	Alexey Khoroshilov <khoroshilov@...ras.ru>,
	Vadim Mutilin <mutilin@...ras.ru>,
	lvc-project@...uxtesting.org
Subject: [PATCH] gpu: cdns-mhdp8546: fix call balance of mhdp->clk handling routines

If the clock mhdp->clk was not enabled in cdns_mhdp_probe(), it should not
be disabled in any path.

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

Fixes: fb43aa0acdfd ("drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge")
Signed-off-by: Vitalii Mordan <mordan@...ras.ru>
---
 drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
index d081850e3c03..3e923bcfb0bf 100644
--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
@@ -2504,7 +2504,11 @@ static int cdns_mhdp_probe(struct platform_device *pdev)
 
 	mhdp->info = of_device_get_match_data(dev);
 
-	clk_prepare_enable(clk);
+	ret = clk_prepare_enable(clk);
+	if (ret) {
+		dev_err(dev, "Failed to enable clk\n");
+		return ret;
+	}
 
 	pm_runtime_enable(dev);
 	ret = pm_runtime_resume_and_get(dev);
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ