Browse Source

ALSA: seq: fix off-by-one error in port limit check

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch 10 years ago
parent
commit
de20b572a3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      sound/core/seq/seq_ports.c

+ 1 - 1
sound/core/seq/seq_ports.c

@@ -134,7 +134,7 @@ struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
 	if (snd_BUG_ON(!client))
 		return NULL;
 
-	if (client->num_ports >= SNDRV_SEQ_MAX_PORTS - 1) {
+	if (client->num_ports >= SNDRV_SEQ_MAX_PORTS) {
 		pr_warn("ALSA: seq: too many ports for client %d\n", client->number);
 		return NULL;
 	}