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
|
@ -32,10 +32,8 @@ int snd_oss_info_register(int dev, int num, char *string)
|
||||||
mutex_lock(&strings);
|
mutex_lock(&strings);
|
||||||
if (string == NULL) {
|
if (string == NULL) {
|
||||||
x = snd_sndstat_strings[num][dev];
|
x = snd_sndstat_strings[num][dev];
|
||||||
if (x) {
|
kfree(x);
|
||||||
kfree(x);
|
x = NULL;
|
||||||
x = NULL;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
x = kstrdup(string, GFP_KERNEL);
|
x = kstrdup(string, GFP_KERNEL);
|
||||||
if (x == NULL) {
|
if (x == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue