diff options
| author | Greg Kroah-Hartman <[email protected]> | 2020-01-21 18:36:59 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2020-01-21 18:36:59 +0000 |
| commit | dd7d99dc688d0fc448976f52f8517fbdeccdccda (patch) | |
| tree | 4ad59de5d584cf03e772ee153260c24ba0d717bd /sound/core/seq/seq_timer.c | |
| parent | phy: ti: j721e-wiz: Fix build error without CONFIG_OF_ADDRESS (diff) | |
| parent | Linux 5.5-rc7 (diff) | |
| download | kernel-dd7d99dc688d0fc448976f52f8517fbdeccdccda.tar.gz kernel-dd7d99dc688d0fc448976f52f8517fbdeccdccda.zip | |
Merge 5.5-rc7 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'sound/core/seq/seq_timer.c')
| -rw-r--r-- | sound/core/seq/seq_timer.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c index 63dc7bdb622d..be59b59c9be4 100644 --- a/sound/core/seq/seq_timer.c +++ b/sound/core/seq/seq_timer.c @@ -471,15 +471,19 @@ void snd_seq_info_timer_read(struct snd_info_entry *entry, q = queueptr(idx); if (q == NULL) continue; - if ((tmr = q->timer) == NULL || - (ti = tmr->timeri) == NULL) { - queuefree(q); - continue; - } + mutex_lock(&q->timer_mutex); + tmr = q->timer; + if (!tmr) + goto unlock; + ti = tmr->timeri; + if (!ti) + goto unlock; snd_iprintf(buffer, "Timer for queue %i : %s\n", q->queue, ti->timer->name); resolution = snd_timer_resolution(ti) * tmr->ticks; snd_iprintf(buffer, " Period time : %lu.%09lu\n", resolution / 1000000000, resolution % 1000000000); snd_iprintf(buffer, " Skew : %u / %u\n", tmr->skew, tmr->skew_base); +unlock: + mutex_unlock(&q->timer_mutex); queuefree(q); } } |
