aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/core/seq/seq_clientmgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 61a07fe34cd2..56ca78423040 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2004,7 +2004,8 @@ static int snd_seq_ioctl_query_next_client(struct snd_seq_client *client,
2004 struct snd_seq_client *cptr = NULL; 2004 struct snd_seq_client *cptr = NULL;
2005 2005
2006 /* search for next client */ 2006 /* search for next client */
2007 info->client++; 2007 if (info->client < INT_MAX)
2008 info->client++;
2008 if (info->client < 0) 2009 if (info->client < 0)
2009 info->client = 0; 2010 info->client = 0;
2010 for (; info->client < SNDRV_SEQ_MAX_CLIENTS; info->client++) { 2011 for (; info->client < SNDRV_SEQ_MAX_CLIENTS; info->client++) {