summaryrefslogtreecommitdiffstats
path: root/sound/core/info_oss.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-08 16:05:27 +0200
committerTakashi Iwai <tiwai@suse.de>2021-06-09 17:30:22 +0200
commite3ded899667731b7b590016adeb7b5948fdcd658 (patch)
tree129fa7664d4780a9bb8962181eb12fccabe959a6 /sound/core/info_oss.c
parente7daaeedb4f270126792ae216f406c1ba2b8f4d9 (diff)
downloadlinux-e3ded899667731b7b590016adeb7b5948fdcd658.tar.bz2
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/info_oss.c')
-rw-r--r--sound/core/info_oss.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/info_oss.c b/sound/core/info_oss.c
index 83900485dd8c..1ba887c7954e 100644
--- a/sound/core/info_oss.c
+++ b/sound/core/info_oss.c
@@ -31,7 +31,8 @@ int snd_oss_info_register(int dev, int num, char *string)
return -ENXIO;
mutex_lock(&strings);
if (string == NULL) {
- if ((x = snd_sndstat_strings[num][dev]) != NULL) {
+ x = snd_sndstat_strings[num][dev];
+ if (x) {
kfree(x);
x = NULL;
}