From: Takashi Iwai <redacted>
[ Upstream commit 6ea9a2b84cc354ffd028195edb4e3d60d47f7bcb ]
PARISC harmony driver code contains an assignment 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-67-tiwai@suse.de (local)
Signed-off-by: Takashi Iwai <redacted>
Stable-dep-of: 33abb7491e89 ("ALSA: harmony: initialize locks before requesting IRQ")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/parisc/harmony.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c
index f2ca0a701987f..1440db8b4177f 100644
--- a/sound/parisc/harmony.c
+++ b/sound/parisc/harmony.c
@@ -915,10 +915,9 @@ snd_harmony_create(struct snd_card *card,
spin_lock_init(&h->mixer_lock);
spin_lock_init(&h->lock);
- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
- h, &ops)) < 0) {
- goto free_and_ret;
- }
+ err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, h, &ops);
+ if (err < 0)
+ goto free_and_ret;
*rchip = h;
--
2.53.0