Skip to content

Commit

Permalink
ALSA: sb: Delete an unnecessary check before the function call "snd_e…
Browse files Browse the repository at this point in the history
…mux_free"

The snd_emux_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 <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Markus Elfring authored and Takashi Iwai committed Jan 4, 2015
1 parent aa57b93 commit b76c0e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/isa/sb/emu8000_synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ static int snd_emu8000_delete_device(struct snd_seq_device *dev)
hw = dev->driver_data;
if (hw->pcm)
snd_device_free(dev->card, hw->pcm);
if (hw->emu)
snd_emux_free(hw->emu);
snd_emux_free(hw->emu);
snd_util_memhdr_free(hw->memhdr);
hw->emu = NULL;
hw->memhdr = NULL;
Expand Down

0 comments on commit b76c0e9

Please sign in to comment.