aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/gus/gusextreme.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-08 16:04:38 +0200
committerTakashi Iwai <tiwai@suse.de>2021-06-09 17:29:39 +0200
commit310efd3aabf2305737b3de2dbdc544d5725e3a52 (patch)
tree5a422068ac360a2b45d8e29b20583b58b04b1733 /sound/isa/gus/gusextreme.c
parentALSA: sb: Fix potential double-free of CSP mixer elements (diff)
downloadlinux-dev-310efd3aabf2305737b3de2dbdc544d5725e3a52.tar.xz
linux-dev-310efd3aabf2305737b3de2dbdc544d5725e3a52.zip
ALSA: gus: Fix assignment in if condition
ISA GUS driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/gus/gusextreme.c')
-rw-r--r--sound/isa/gus/gusextreme.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index da2b2ca6b721..a409a4a29afc 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -177,14 +177,16 @@ static int snd_gusextreme_detect(struct snd_gus_card *gus,
udelay(100);
snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */
- if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) {
+ d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET);
+ if ((d & 0x07) != 0) {
snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d);
return -EIO;
}
udelay(160);
snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */
udelay(160);
- if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) {
+ d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET);
+ if ((d & 0x07) != 1) {
snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d);
return -EIO;
}