Skip to content

Commit

Permalink
ALSA: seq: fix off-by-one error in port limit check
Browse files Browse the repository at this point in the history
Signed-off-by: Clemens Ladisch <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
cladisch authored and tiwai committed Jan 26, 2015
1 parent 467be35 commit de20b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/core/seq/seq_ports.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit de20b57

Please sign in to comment.