ALSA: oss: remove useless NULL check before kfree

Tis patch try to remove useless NULL check before kfree

Signed-off-by: Bernard Zhao <bernard@vivo.com>
Link: https://lore.kernel.org/r/20211206014135.320720-1-bernard@vivo.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Bernard Zhao 2021-12-05 17:40:46 -08:00 committed by Takashi Iwai
parent d13a8f6d8e
commit 82cd3ba691

View file

@ -32,10 +32,8 @@ int snd_oss_info_register(int dev, int num, char *string)
mutex_lock(&strings);
if (string == NULL) {
x = snd_sndstat_strings[num][dev];
if (x) {
kfree(x);
x = NULL;
}
kfree(x);
x = NULL;
} else {
x = kstrdup(string, GFP_KERNEL);
if (x == NULL) {