mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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 <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
eaa8e5ef18
commit
d712eaf29d
@ -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);
|
||||
}
|
||||
|
@ -39,8 +39,7 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab)
|
||||
if (! sgbuf)
|
||||
return -EINVAL;
|
||||
|
||||
if (dmab->area)
|
||||
vunmap(dmab->area);
|
||||
vunmap(dmab->area);
|
||||
dmab->area = NULL;
|
||||
|
||||
tmpb.dev.type = SNDRV_DMA_TYPE_DEV;
|
||||
|
Loading…
Reference in New Issue
Block a user