diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-05-02 08:24:42 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-05-02 08:24:42 +0200 |
commit | d7dc450d5a7162de96edbed6b1792240c2f3a55f (patch) | |
tree | d6dc2d26b393dd69881cd4b9498718f65b35abeb /sound/core/timer.c | |
parent | d4a2fbcee0c8449ce24d6de168f3d90c5e6d7596 (diff) | |
parent | 0997e378be1d888a5d093eeee55f842cdfe55ebe (diff) | |
download | linux-d7dc450d5a7162de96edbed6b1792240c2f3a55f.tar.gz linux-d7dc450d5a7162de96edbed6b1792240c2f3a55f.tar.xz |
Merge branch 'for-next' into for-linus
For 4.12 merge.
Diffstat (limited to 'sound/core/timer.c')
-rw-r--r-- | sound/core/timer.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index 6d4fbc439246..2f836ca09860 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1277,6 +1277,7 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri, struct timespec tstamp; int prev, append = 0; + memset(&r1, 0, sizeof(r1)); memset(&tstamp, 0, sizeof(tstamp)); spin_lock(&tu->qlock); if ((tu->filter & ((1 << SNDRV_TIMER_EVENT_RESOLUTION) | @@ -1292,7 +1293,6 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri, } if ((tu->filter & (1 << SNDRV_TIMER_EVENT_RESOLUTION)) && tu->last_resolution != resolution) { - memset(&r1, 0, sizeof(r1)); r1.event = SNDRV_TIMER_EVENT_RESOLUTION; r1.tstamp = tstamp; r1.val = resolution; @@ -1430,18 +1430,13 @@ static int snd_timer_user_next_device(struct snd_timer_id __user *_tid) if (id.card < 0) { id.card = 0; } else { - if (id.card < 0) { - id.card = 0; + if (id.device < 0) { + id.device = 0; } else { - if (id.device < 0) { - id.device = 0; - } else { - if (id.subdevice < 0) { - id.subdevice = 0; - } else { - id.subdevice++; - } - } + if (id.subdevice < 0) + id.subdevice = 0; + else + id.subdevice++; } } list_for_each(p, &snd_timer_list) { |