diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-06-08 16:04:40 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-06-09 17:29:42 +0200 |
commit | 520226e93e2620e027bde67a75025b3d61916a40 (patch) | |
tree | 7a4817b8b0c5157554ab329733d39b5919fed8f2 /sound/isa/wavefront/wavefront.c | |
parent | 5ab6d6601366f298dd787fd78c8b55e4a8af2bc8 (diff) | |
download | lwn-520226e93e2620e027bde67a75025b3d61916a40.tar.gz lwn-520226e93e2620e027bde67a75025b3d61916a40.zip |
ALSA: wavefront: Fix assignment in if condition
ISA WaveFront 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-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/wavefront/wavefront.c')
-rw-r--r-- | sound/isa/wavefront/wavefront.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index a4437971df2f..dfdeaf7b6bf4 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c @@ -555,7 +555,8 @@ static int snd_wavefront_isa_probe(struct device *pdev, err = snd_wavefront_card_new(pdev, dev, &card); if (err < 0) return err; - if ((err = snd_wavefront_probe(card, dev)) < 0) { + err = snd_wavefront_probe(card, dev); + if (err < 0) { snd_card_free(card); return err; } @@ -610,7 +611,8 @@ static int snd_wavefront_pnp_detect(struct pnp_card_link *pcard, } } - if ((res = snd_wavefront_probe(card, dev)) < 0) + res = snd_wavefront_probe(card, dev); + if (res < 0) return res; pnp_set_card_drvdata(pcard, card); |