From: Markus Elfring Date: Sat, 3 Jan 2015 17:28:21 +0000 (+0100) Subject: ALSA: emux: Delete an unnecessary check before the function call "snd_sf_free" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b172e0aae6d14baf646a36052d03b301535f4ef5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ALSA: emux: Delete an unnecessary check before the function call "snd_sf_free" The snd_sf_free() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai --- diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c index 93522072bc87..f27a1c85f81b 100644 --- a/sound/synth/emux/emux.c +++ b/sound/synth/emux/emux.c @@ -160,12 +160,8 @@ int snd_emux_free(struct snd_emux *emu) snd_emux_detach_seq_oss(emu); #endif snd_emux_detach_seq(emu); - snd_emux_delete_hwdep(emu); - - if (emu->sflist) - snd_sf_free(emu->sflist); - + snd_sf_free(emu->sflist); kfree(emu->voices); kfree(emu->name); kfree(emu);