Skip to content

Commit

Permalink
ALSA: emux: Delete an unnecessary check before the function call "snd…
Browse files Browse the repository at this point in the history
…_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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
elfring authored and tiwai committed Jan 4, 2015
1 parent 1fac168 commit b172e0a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sound/synth/emux/emux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b172e0a

Please sign in to comment.