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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1652926418-8519-2-git-send-email-u0084500@gmail.com>
Date:   Thu, 19 May 2022 10:13:37 +0800
From:   cy_huang <u0084500@...il.com>
To:     broonie@...nel.org, perex@...ex.cz, tiwai@...e.com
Cc:     oder_chiou@...ltek.com, lgirdwood@...il.com,
        ritchie_hsieh@...htek.com, allen_lin@...htek.com,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        ChiYuan Huang <cy_huang@...htek.com>
Subject: [PATCH 1/2] ASoC: rt9120: Fix 3byte read, valule offset typo

From: ChiYuan Huang <cy_huang@...htek.com>

For RG 3byte read, the value order is  offset [0], [1], and [2].

Signed-off-by: ChiYuan Huang <cy_huang@...htek.com>
---
 sound/soc/codecs/rt9120.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt9120.c b/sound/soc/codecs/rt9120.c
index cdf8ad2..94d42be 100644
--- a/sound/soc/codecs/rt9120.c
+++ b/sound/soc/codecs/rt9120.c
@@ -372,7 +372,7 @@ static int rt9120_reg_read(void *context, unsigned int reg, unsigned int *val)
 		*val = be32_to_cpup((__be32 *)raw);
 		break;
 	case 3:
-		*val = raw[0] << 16 | raw[1] << 8 | raw[0];
+		*val = raw[0] << 16 | raw[1] << 8 | raw[2];
 		break;
 	case 2:
 		*val = be16_to_cpup((__be16 *)raw);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ