summaryrefslogtreecommitdiff
path: root/sound/core/timer.c
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-09-09 01:26:03 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-09 01:26:03 -0700
commitc1754736437db10a69b01f35b8b74ddba974f846 (patch)
treeaafc864635501371a0466c0b75eafda206dc917a /sound/core/timer.c
parent39dfe0cc0a3d036b50f1ef4313e110ecfc0bc051 (diff)
parent0981a7c54f186f2a7b79642c32f7312a6234cbd4 (diff)
Merge "ALSA: timer: check if timer->card is null before using it"
Diffstat (limited to 'sound/core/timer.c')
-rw-r--r--sound/core/timer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c
index a3f547badd38..f420cd8583da 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1121,7 +1121,11 @@ static void snd_timer_proc_read(struct snd_info_entry *entry,
mutex_lock(&register_mutex);
list_for_each_entry(timer, &snd_timer_list, device_list) {
- if (timer->card && timer->card->shutdown)
+ if (timer->card == NULL) {
+ pr_debug("%s: timer->card is NULL\n", __func__);
+ continue;
+ }
+ if (timer->card->shutdown)
continue;
switch (timer->tmr_class) {
case SNDRV_TIMER_CLASS_GLOBAL: