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_uart.c | |
parent | ALSA: sb: Fix potential double-free of CSP mixer elements (diff) | |
download | linux-310efd3aabf2305737b3de2dbdc544d5725e3a52.tar.xz 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_uart.c')
-rw-r--r-- | sound/isa/gus/gus_uart.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c index 4fb4ed79e262..3975848160e7 100644 --- a/sound/isa/gus/gus_uart.c +++ b/sound/isa/gus/gus_uart.c @@ -232,7 +232,8 @@ int snd_gf1_rawmidi_new(struct snd_gus_card *gus, int device) struct snd_rawmidi *rmidi; int err; - if ((err = snd_rawmidi_new(gus->card, "GF1", device, 1, 1, &rmidi)) < 0) + err = snd_rawmidi_new(gus->card, "GF1", device, 1, 1, &rmidi); + if (err < 0) return err; strcpy(rmidi->name, gus->interwave ? "AMD InterWave" : "GF1"); snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_gf1_uart_output); |