diff --git a/sound/core/timer.c b/sound/core/timer.c index 30857a7e2dc9..593deebd9da6 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1462,7 +1462,7 @@ static int snd_timer_user_next_device(struct snd_timer_id __user *_tid) } else { if (id.subdevice < 0) { id.subdevice = 0; - } else { + } else if (id.subdevice < INT_MAX) { id.subdevice++; } }