diff options
author | Benjamin Tissoires <bentiss@kernel.org> | 2024-07-16 12:19:28 +0200 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-07-16 12:19:28 +0200 |
commit | 3c69140734a27f8b145f12fa0ae80c1fe36a02ca (patch) | |
tree | ad36bf7e6a5400212fbf917eceb4c7ad4df5d557 /sound/core/timer.c | |
parent | 5ba28be6be8ac6cd4fa1ac67cd4da237d39917d2 (diff) | |
parent | 8a25418ba65a5d2494b369f6178a284c449bc399 (diff) |
Merge branch 'for-6.11/trivial' into for-linus
Couple of trivial fixes:
- extra semicolon (Chen Ni)
- typo (Thorsten Blum)
Diffstat (limited to 'sound/core/timer.c')
-rw-r--r-- | sound/core/timer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index 4d2ee99c12a3..d104adc75a8b 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -544,6 +544,14 @@ static int snd_timer_start1(struct snd_timer_instance *timeri, SNDRV_TIMER_IFLG_START)) return -EBUSY; + /* check the actual time for the start tick; + * bail out as error if it's way too low (< 100us) + */ + if (start) { + if ((u64)snd_timer_hw_resolution(timer) * ticks < 100000) + return -EINVAL; + } + if (start) timeri->ticks = timeri->cticks = ticks; else if (!timeri->cticks) |