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: <20241008025923.10606-1-zhujun2@cmss.chinamobile.com>
Date: Mon,  7 Oct 2024 19:59:23 -0700
From: Zhu Jun <zhujun2@...s.chinamobile.com>
To: perex@...ex.cz
Cc: tiwai@...e.com,
	wangweidong.a@...nic.com,
	andriy.shevchenko@...ux.intel.com,
	heiko@...ech.de,
	kuninori.morimoto.gx@...esas.com,
	nathan@...nel.org,
	u.kleine-koenig@...libre.com,
	zhujun2@...s.chinamobile.com,
	linux-kernel@...r.kernel.org,
	linux-sound@...r.kernel.org,
	broonie@...nel.org,
	lgirdwood@...il.com
Subject: [PATCH] sound:aw88399:Correct error handling in aw_dev_get_dsp_status function

Added proper error handling for register value check that
return -EPERM when register value does not meet expected condition

Signed-off-by: Zhu Jun <zhujun2@...s.chinamobile.com>
---
 sound/soc/codecs/aw88399.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c
index 8dc2b8aa6832..bba59885242d 100644
--- a/sound/soc/codecs/aw88399.c
+++ b/sound/soc/codecs/aw88399.c
@@ -656,7 +656,7 @@ static int aw_dev_get_dsp_status(struct aw_device *aw_dev)
 	if (ret)
 		return ret;
 	if (!(reg_val & (~AW88399_WDT_CNT_MASK)))
-		ret = -EPERM;
+		return -EPERM;
 
 	return 0;
 }
-- 
2.17.1




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ