summaryrefslogtreecommitdiff
path: root/sound/core/seq/oss
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-01-03 14:54:56 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-04 15:11:05 +0100
commit57dca36ee25bcab20a71705175c00b6f114cdab4 (patch)
treec3c6ee752a87305b99d0e6b4b5f03adc19aee41a /sound/core/seq/oss
parentadc2ae0bb6daa2287d1a6567d18be01da546f7a7 (diff)
ALSA: seq: Deletion of unnecessary checks before the function call "snd_midi_event_free"
The snd_midi_event_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>
Diffstat (limited to 'sound/core/seq/oss')
-rw-r--r--sound/core/seq/oss/seq_oss_midi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c
index 3a4569669efa..e79cc44b1394 100644
--- a/sound/core/seq/oss/seq_oss_midi.c
+++ b/sound/core/seq/oss/seq_oss_midi.c
@@ -237,8 +237,7 @@ snd_seq_oss_midi_check_exit_port(int client, int port)
spin_unlock_irqrestore(&register_lock, flags);
snd_use_lock_free(&mdev->use_lock);
snd_use_lock_sync(&mdev->use_lock);
- if (mdev->coder)
- snd_midi_event_free(mdev->coder);
+ snd_midi_event_free(mdev->coder);
kfree(mdev);
}
spin_lock_irqsave(&register_lock, flags);
@@ -265,8 +264,7 @@ snd_seq_oss_midi_clear_all(void)
spin_lock_irqsave(&register_lock, flags);
for (i = 0; i < max_midi_devs; i++) {
if ((mdev = midi_devs[i]) != NULL) {
- if (mdev->coder)
- snd_midi_event_free(mdev->coder);
+ snd_midi_event_free(mdev->coder);
kfree(mdev);
midi_devs[i] = NULL;
}