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>
This commit is contained in:
parent
467be357c6
commit
de20b572a3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue