diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-06-08 16:05:27 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-06-09 17:30:22 +0200 |
commit | e3ded899667731b7b590016adeb7b5948fdcd658 (patch) | |
tree | 129fa7664d4780a9bb8962181eb12fccabe959a6 /sound/core/sound.c | |
parent | e7daaeedb4f270126792ae216f406c1ba2b8f4d9 (diff) |
ALSA: core: Fix assignment in if condition
There are a few places doing assignments in if condition in ALSA core
code, 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-54-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/sound.c')
-rw-r--r-- | sound/core/sound.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c index af89e51dd44a..df5571d98629 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c @@ -357,7 +357,8 @@ static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_bu mutex_lock(&sound_mutex); for (minor = 0; minor < SNDRV_OS_MINORS; ++minor) { - if (!(mptr = snd_minors[minor])) + mptr = snd_minors[minor]; + if (!mptr) continue; if (mptr->card >= 0) { if (mptr->device >= 0) |