diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-06-08 16:05:32 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-06-09 17:30:29 +0200 |
commit | bdab9e5c3eb3a633903ae423587fa9bf67555b69 (patch) | |
tree | c3d8de6ab01c21b942c288c4d106f3d0abb1669e /sound/sparc/amd7930.c | |
parent | 2073fa449d6d2ac52d511fad4bce121fd284a7f3 (diff) | |
download | lwn-bdab9e5c3eb3a633903ae423587fa9bf67555b69.tar.gz lwn-bdab9e5c3eb3a633903ae423587fa9bf67555b69.zip |
ALSA: sparc: Fix assignment in if condition
SPARC 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-59-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/sparc/amd7930.c')
-rw-r--r-- | sound/sparc/amd7930.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index d24ae00878f5..c434b69a83f1 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c @@ -975,8 +975,9 @@ static int snd_amd7930_create(struct snd_card *card, spin_unlock_irqrestore(&amd->lock, flags); - if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, - amd, &snd_amd7930_dev_ops)) < 0) { + err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, + amd, &snd_amd7930_dev_ops); + if (err < 0) { snd_amd7930_free(amd); return err; } @@ -1019,13 +1020,16 @@ static int amd7930_sbus_probe(struct platform_device *op) irq, dev_num, &amd)) < 0) goto out_err; - if ((err = snd_amd7930_pcm(amd)) < 0) + err = snd_amd7930_pcm(amd); + if (err < 0) goto out_err; - if ((err = snd_amd7930_mixer(amd)) < 0) + err = snd_amd7930_mixer(amd); + if (err < 0) goto out_err; - if ((err = snd_card_register(card)) < 0) + err = snd_card_register(card); + if (err < 0) goto out_err; amd->next = amd7930_list; |