summaryrefslogtreecommitdiff
path: root/sound/isa/ad1816a/ad1816a.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-08 17:04:39 +0300
committerTakashi Iwai <tiwai@suse.de>2021-06-09 18:29:41 +0300
commit5ab6d6601366f298dd787fd78c8b55e4a8af2bc8 (patch)
treefacf8b135110b143f7d11e307fb261e2c7ace1ad /sound/isa/ad1816a/ad1816a.c
parent310efd3aabf2305737b3de2dbdc544d5725e3a52 (diff)
downloadlinux-5ab6d6601366f298dd787fd78c8b55e4a8af2bc8.tar.xz
ALSA: ad1816a: Fix assignment in if condition
ISA AD1816A 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-6-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/ad1816a/ad1816a.c')
-rw-r--r--sound/isa/ad1816a/ad1816a.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index f11af983b3b6..fa5bed0d5a6f 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -131,16 +131,18 @@ static int snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard,
return error;
chip = card->private_data;
- if ((error = snd_card_ad1816a_pnp(dev, pcard, pid))) {
+ error = snd_card_ad1816a_pnp(dev, pcard, pid);
+ if (error) {
snd_card_free(card);
return error;
}
- if ((error = snd_ad1816a_create(card, port[dev],
- irq[dev],
- dma1[dev],
- dma2[dev],
- chip)) < 0) {
+ error = snd_ad1816a_create(card, port[dev],
+ irq[dev],
+ dma1[dev],
+ dma2[dev],
+ chip);
+ if (error) {
snd_card_free(card);
return error;
}
@@ -152,12 +154,14 @@ static int snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard,
sprintf(card->longname, "%s, SS at 0x%lx, irq %d, dma %d&%d",
card->shortname, chip->port, irq[dev], dma1[dev], dma2[dev]);
- if ((error = snd_ad1816a_pcm(chip, 0)) < 0) {
+ error = snd_ad1816a_pcm(chip, 0);
+ if (error < 0) {
snd_card_free(card);
return error;
}
- if ((error = snd_ad1816a_mixer(chip)) < 0) {
+ error = snd_ad1816a_mixer(chip);
+ if (error < 0) {
snd_card_free(card);
return error;
}
@@ -189,7 +193,8 @@ static int snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard,
}
}
- if ((error = snd_card_register(card)) < 0) {
+ error = snd_card_register(card);
+ if (error < 0) {
snd_card_free(card);
return error;
}