summaryrefslogtreecommitdiff
path: root/sound/synth/emux/emux_hwdep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-08 17:05:37 +0300
committerTakashi Iwai <tiwai@suse.de>2021-06-09 18:30:35 +0300
commitdd1fc3c585dddf0f8d1baaa941395aa4afdfa724 (patch)
treeb2636b6a3658fff9e66046cdbdf4b5b7005f0e1d /sound/synth/emux/emux_hwdep.c
parentd0ad13ef704164cf41b5f38d3c9e87dd8f67b5bb (diff)
downloadlinux-dd1fc3c585dddf0f8d1baaa941395aa4afdfa724.tar.xz
ALSA: synth: Fix assignment in if condition
EMUx synth 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-64-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/synth/emux/emux_hwdep.c')
-rw-r--r--sound/synth/emux/emux_hwdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/synth/emux/emux_hwdep.c b/sound/synth/emux/emux_hwdep.c
index 8a965e2f160a..81719bfb8ed7 100644
--- a/sound/synth/emux/emux_hwdep.c
+++ b/sound/synth/emux/emux_hwdep.c
@@ -116,7 +116,8 @@ snd_emux_init_hwdep(struct snd_emux *emu)
struct snd_hwdep *hw;
int err;
- if ((err = snd_hwdep_new(emu->card, SNDRV_EMUX_HWDEP_NAME, emu->hwdep_idx, &hw)) < 0)
+ err = snd_hwdep_new(emu->card, SNDRV_EMUX_HWDEP_NAME, emu->hwdep_idx, &hw);
+ if (err < 0)
return err;
emu->hwdep = hw;
strcpy(hw->name, SNDRV_EMUX_HWDEP_NAME);
@@ -127,7 +128,8 @@ snd_emux_init_hwdep(struct snd_emux *emu)
hw->ops.ioctl_compat = snd_emux_hwdep_ioctl;
hw->exclusive = 1;
hw->private_data = emu;
- if ((err = snd_card_register(emu->card)) < 0)
+ err = snd_card_register(emu->card);
+ if (err < 0)
return err;
return 0;