projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0584ffa
)
ALSA: timer - Add NULL-check for invalid slave timer
author
Takashi Iwai
<tiwai@suse.de>
Mon, 8 Aug 2011 10:28:22 +0000
(12:28 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Mon, 8 Aug 2011 10:28:22 +0000
(12:28 +0200)
Just to be sure.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/timer.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/core/timer.c
b/sound/core/timer.c
index 950eed0c098e69e128f0ce8448a2a6f4c5fb7bca..67ebf1c21c043a61dc0b51012f00778612af7b45 100644
(file)
--- a/
sound/core/timer.c
+++ b/
sound/core/timer.c
@@
-328,6
+328,8
@@
int snd_timer_close(struct snd_timer_instance *timeri)
mutex_unlock(®ister_mutex);
} else {
timer = timeri->timer;
+ if (snd_BUG_ON(!timer))
+ goto out;
/* wait, until the active callback is finished */
spin_lock_irq(&timer->lock);
while (timeri->flags & SNDRV_TIMER_IFLG_CALLBACK) {
@@
-353,6
+355,7
@@
int snd_timer_close(struct snd_timer_instance *timeri)
}
mutex_unlock(®ister_mutex);
}
+ out:
if (timeri->private_free)
timeri->private_free(timeri);
kfree(timeri->owner);