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: <20240717073553.1821677-1-nichen@iscas.ac.cn>
Date: Wed, 17 Jul 2024 15:35:53 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: vkoul@...nel.org,
	konrad.dybcio@...aro.org,
	gustavoars@...nel.org,
	u.kleine-koenig@...gutronix.de,
	kees@...nel.org,
	caleb.connolly@...aro.org
Cc: linux-arm-msm@...r.kernel.org,
	dmaengine@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Chen Ni <nichen@...as.ac.cn>
Subject: [PATCH] dmaengine: qcom: bam_dma: Handle the return value of bam_dma_resume

As pm_runtime_force_resume() can return error numbers, it should be
better to check the return value and deal with the exception.

Fixes: 0ac9c3dd0d6f ("dmaengine: qcom: bam_dma: fix runtime PM underflow")
Signed-off-by: Chen Ni <nichen@...as.ac.cn>
---
 drivers/dma/qcom/bam_dma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 5e7d332731e0..d2f5a77dfade 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -1460,9 +1460,7 @@ static int __maybe_unused bam_dma_resume(struct device *dev)
 	if (ret)
 		return ret;
 
-	pm_runtime_force_resume(dev);
-
-	return 0;
+	return pm_runtime_force_resume(dev);
 }
 
 static const struct dev_pm_ops bam_dma_pm_ops = {
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ