diff options
author | Bernard Zhao <bernard@vivo.com> | 2021-12-05 17:40:46 -0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-12-06 10:08:13 +0100 |
commit | 82cd3ba691a920007503d189989d2495a41a3a10 (patch) | |
tree | 6c5a5da5751c2a041ab51e16eb554eaae753bd39 /sound/core | |
parent | d13a8f6d8e01a17a9fe36029e346a1f029362c9e (diff) | |
download | linux-82cd3ba691a920007503d189989d2495a41a3a10.tar.gz linux-82cd3ba691a920007503d189989d2495a41a3a10.tar.bz2 linux-82cd3ba691a920007503d189989d2495a41a3a10.zip |
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>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/info_oss.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/core/info_oss.c b/sound/core/info_oss.c index 1ba887c7954e..ebc714b2f46b 100644 --- a/sound/core/info_oss.c +++ b/sound/core/info_oss.c @@ -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) { |