summaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/mia_dsp.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-08 16:05:13 +0200
committerTakashi Iwai <tiwai@suse.de>2021-06-09 17:30:08 +0200
commit549717fc5b4cf5a791d46e23c607c03afc8c94d3 (patch)
tree2ab21caba25347d3d34969b2398e1b630733ea14 /sound/pci/echoaudio/mia_dsp.c
parent164b3ddeb026bf86df1829577674ed506ff4cbde (diff)
downloadlinux-stable-549717fc5b4cf5a791d46e23c607c03afc8c94d3.tar.gz
linux-stable-549717fc5b4cf5a791d46e23c607c03afc8c94d3.tar.bz2
linux-stable-549717fc5b4cf5a791d46e23c607c03afc8c94d3.zip
ALSA: echoaudio: Fix assignment in if condition
PCI echoaudio drivers contain a few 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-40-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/echoaudio/mia_dsp.c')
-rw-r--r--sound/pci/echoaudio/mia_dsp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/echoaudio/mia_dsp.c b/sound/pci/echoaudio/mia_dsp.c
index 8f612a09c5d0..8a4dffc68889 100644
--- a/sound/pci/echoaudio/mia_dsp.c
+++ b/sound/pci/echoaudio/mia_dsp.c
@@ -44,7 +44,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
if (snd_BUG_ON((subdevice_id & 0xfff0) != MIA))
return -ENODEV;
- if ((err = init_dsp_comm_page(chip))) {
+ err = init_dsp_comm_page(chip);
+ if (err) {
dev_err(chip->card->dev,
"init_hw - could not initialize DSP comm page\n");
return err;
@@ -62,7 +63,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL |
ECHO_CLOCK_BIT_SPDIF;
- if ((err = load_firmware(chip)) < 0)
+ err = load_firmware(chip);
+ if (err < 0)
return err;
chip->bad_board = false;