Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d712eaf2 authored by Markus Elfring's avatar Markus Elfring Committed by Takashi Iwai
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent eaa8e5ef
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -403,13 +403,10 @@ free_devinfo(void *private)
{
	struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private;

	if (dp->timer)
	snd_seq_oss_timer_delete(dp->timer);
		
	if (dp->writeq)
	snd_seq_oss_writeq_delete(dp->writeq);

	if (dp->readq)
	snd_seq_oss_readq_delete(dp->readq);
	
	kfree(dp);
+1 −2
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab)
	if (! sgbuf)
		return -EINVAL;

	if (dmab->area)
	vunmap(dmab->area);
	dmab->area = NULL;