From d712eaf29d3fe5928d891a4a90ac58644ad595ed Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Fri, 21 Nov 2014 18:34:48 +0100 Subject: ALSA: core: Deletion of unnecessary checks before two function calls The functions snd_seq_oss_timer_delete() and vunmap() perform also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai --- sound/core/seq/oss/seq_oss_init.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sound/core/seq/oss') diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index b9184d20c39f..b0e32e161dd1 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -403,14 +403,11 @@ free_devinfo(void *private) { struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private; - if (dp->timer) - snd_seq_oss_timer_delete(dp->timer); + snd_seq_oss_timer_delete(dp->timer); - if (dp->writeq) - snd_seq_oss_writeq_delete(dp->writeq); + snd_seq_oss_writeq_delete(dp->writeq); - if (dp->readq) - snd_seq_oss_readq_delete(dp->readq); + snd_seq_oss_readq_delete(dp->readq); kfree(dp); } -- cgit