summaryrefslogtreecommitdiff
path: root/sound/isa
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-08 16:04:47 +0200
committerTakashi Iwai <tiwai@suse.de>2021-06-09 17:29:47 +0200
commit115c45565385e655ddcf861e631b0b8bba56a988 (patch)
tree39939661b916f89d166df9e6e03dd2b3de0bd237 /sound/isa
parentce29edbd26fdde4638ff301927159a9afbac4c6d (diff)
ALSA: azt2320: Fix assignment in if condition
ISA AZT2320 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-14-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/azt2320.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/sound/isa/azt2320.c b/sound/isa/azt2320.c
index 867e9ae8f65a..dd5c059b3744 100644
--- a/sound/isa/azt2320.c
+++ b/sound/isa/azt2320.c
@@ -148,9 +148,11 @@ static int snd_card_azt2320_enable_wss(unsigned long port)
{
int error;
- if ((error = snd_card_azt2320_command(port, 0x09)))
+ error = snd_card_azt2320_command(port, 0x09);
+ if (error)
return error;
- if ((error = snd_card_azt2320_command(port, 0x00)))
+ error = snd_card_azt2320_command(port, 0x00);
+ if (error)
return error;
mdelay(5);
@@ -174,12 +176,14 @@ static int snd_card_azt2320_probe(int dev,
return error;
acard = card->private_data;
- if ((error = snd_card_azt2320_pnp(dev, acard, pcard, pid))) {
+ error = snd_card_azt2320_pnp(dev, acard, pcard, pid);
+ if (error) {
snd_card_free(card);
return error;
}
- if ((error = snd_card_azt2320_enable_wss(port[dev]))) {
+ error = snd_card_azt2320_enable_wss(port[dev]);
+ if (error) {
snd_card_free(card);
return error;
}
@@ -228,18 +232,21 @@ static int snd_card_azt2320_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, 1, 2)) < 0) {
+ error = snd_opl3_timer_new(opl3, 1, 2);
+ 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;
}