diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-06-08 16:04:38 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-06-09 17:29:39 +0200 |
commit | 310efd3aabf2305737b3de2dbdc544d5725e3a52 (patch) | |
tree | 5a422068ac360a2b45d8e29b20583b58b04b1733 /sound/isa/gus/gus_mem.c | |
parent | c305366a37441c2ac90b08711cb6f032b43672f2 (diff) | |
download | linux-310efd3aabf2305737b3de2dbdc544d5725e3a52.tar.gz linux-310efd3aabf2305737b3de2dbdc544d5725e3a52.tar.bz2 linux-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/gus_mem.c')
-rw-r--r-- | sound/isa/gus/gus_mem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index cb02d18dde60..ff9480f249fe 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c @@ -210,7 +210,8 @@ int snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address) struct snd_gf1_mem_block *block; snd_gf1_mem_lock(alloc, 0); - if ((block = snd_gf1_mem_look(alloc, address)) != NULL) { + block = snd_gf1_mem_look(alloc, address); + if (block) { result = snd_gf1_mem_xfree(alloc, block); snd_gf1_mem_lock(alloc, 1); return result; |