summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-08 16:04:46 +0200
committerTakashi Iwai <tiwai@suse.de>2021-06-09 17:29:47 +0200
commitce29edbd26fdde4638ff301927159a9afbac4c6d (patch)
tree0224a9019b81c40a6a53bc430a88a37e5578f199
parent3e38150bf238bba285c802f074b98921b2878b1e (diff)
downloadlinux-ce29edbd26fdde4638ff301927159a9afbac4c6d.tar.bz2
ALSA: als100: Fix assignment in if condition
ISA ALS100 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-13-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/isa/als100.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/isa/als100.c b/sound/isa/als100.c
index bacb7a1b930c..d4597fdfe091 100644
--- a/sound/isa/als100.c
+++ b/sound/isa/als100.c
@@ -177,7 +177,8 @@ static int snd_card_als100_probe(int dev,
return error;
acard = card->private_data;
- if ((error = snd_card_als100_pnp(dev, acard, pcard, pid))) {
+ error = snd_card_als100_pnp(dev, acard, pcard, pid);
+ if (error) {
snd_card_free(card);
return error;
}
@@ -211,12 +212,14 @@ static int snd_card_als100_probe(int dev,
dma16[dev]);
}
- if ((error = snd_sb16dsp_pcm(chip, 0)) < 0) {
+ error = snd_sb16dsp_pcm(chip, 0);
+ if (error < 0) {
snd_card_free(card);
return error;
}
- if ((error = snd_sbmixer_new(chip)) < 0) {
+ error = snd_sbmixer_new(chip);
+ if (error < 0) {
snd_card_free(card);
return error;
}
@@ -245,18 +248,21 @@ static int snd_card_als100_probe(int dev,
snd_printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx\n",
fm_port[dev], fm_port[dev] + 2);
} else {
- if ((error = snd_opl3_timer_new(opl3, 0, 1)) < 0) {
+ error = snd_opl3_timer_new(opl3, 0, 1);
+ if (error < 0) {
snd_card_free(card);
return error;
}
- if ((error = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
+ error = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
+ if (error < 0) {
snd_card_free(card);
return error;
}
}
}
- if ((error = snd_card_register(card)) < 0) {
+ error = snd_card_register(card);
+ if (error < 0) {
snd_card_free(card);
return error;
}