mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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:
parent
d13a8f6d8e
commit
82cd3ba691
1 changed files with 2 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue