Skip to content

Commit b76c0e9

Browse files
elfringtiwai
authored andcommitted
ALSA: sb: Delete an unnecessary check before the function call "snd_emux_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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent aa57b93 commit b76c0e9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/isa/sb/emu8000_synth.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ static int snd_emu8000_delete_device(struct snd_seq_device *dev)
103103
hw = dev->driver_data;
104104
if (hw->pcm)
105105
snd_device_free(dev->card, hw->pcm);
106-
if (hw->emu)
107-
snd_emux_free(hw->emu);
106+
snd_emux_free(hw->emu);
108107
snd_util_memhdr_free(hw->memhdr);
109108
hw->emu = NULL;
110109
hw->memhdr = NULL;

0 commit comments

Comments
 (0)