瀏覽代碼

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 <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Markus Elfring 10 年之前
父節點
當前提交
b76c0e95ab
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      sound/isa/sb/emu8000_synth.c

+ 1 - 2
sound/isa/sb/emu8000_synth.c

@@ -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;