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: <20230704091131.6662-1-duminjie@vivo.com>
Date:   Tue,  4 Jul 2023 17:11:31 +0800
From:   Minjie Du <duminjie@...o.com>
To:     Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        Minjie Du <duminjie@...o.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        alsa-devel@...a-project.org (moderated list:SOUND),
        linux-kernel@...r.kernel.org (open list)
Cc:     opensource.kernel@...o.com
Subject: [PATCH v1] sound: riptide: Remove duplicate judgments code

Fix: delate duplicate judgments
Could you help check it out? Thank you!

Signed-off-by: Minjie Du <duminjie@...o.com>
---
 sound/pci/riptide/riptide.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index b37c877c2..9bf4b2e86 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -958,8 +958,7 @@ getsourcesink(struct cmdif *cif, unsigned char source, unsigned char sink,
 {
 	union cmdret rptr = CMDRET_ZERO;
 
-	if (SEND_RSSV(cif, source, sink, &rptr) &&
-	    SEND_RSSV(cif, source, sink, &rptr))
+	if (SEND_RSSV(cif, source, sink, &rptr))
 		return -EIO;
 	*a = rptr.retbytes[0];
 	*b = rptr.retbytes[1];
@@ -978,8 +977,7 @@ getsamplerate(struct cmdif *cif, unsigned char *intdec, unsigned int *rate)
 	s = intdec;
 	for (i = 0; i < 2; i++) {
 		if (*s != 0xff) {
-			if (SEND_RSRC(cif, *s, &rptr) &&
-			    SEND_RSRC(cif, *s, &rptr))
+			if (SEND_RSRC(cif, *s, &rptr))
 				return -EIO;
 			p[i] += rptr.retwords[1];
 			p[i] *= rptr.retwords[2];
@@ -1013,8 +1011,7 @@ setsampleformat(struct cmdif *cif,
 	sig = snd_pcm_format_unsigned(format) != 0;
 	order = snd_pcm_format_big_endian(format) != 0;
 
-	if (SEND_SETF(cif, mixer, w, ch, order, sig, id) &&
-	    SEND_SETF(cif, mixer, w, ch, order, sig, id)) {
+	if (SEND_SETF(cif, mixer, w, ch, order, sig, id)) {
 		snd_printdd("setsampleformat failed\n");
 		return -EIO;
 	}
@@ -1060,7 +1057,7 @@ getmixer(struct cmdif *cif, short num, unsigned short *rval,
 {
 	union cmdret rptr = CMDRET_ZERO;
 
-	if (SEND_RDGV(cif, num, num, &rptr) && SEND_RDGV(cif, num, num, &rptr))
+	if (SEND_RDGV(cif, num, num, &rptr))
 		return -EIO;
 	*rval = rptr.retwords[0];
 	*lval = rptr.retwords[1];
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ