aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2015-01-25 08:35:24 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-26 07:54:47 -0500
commitde20b572a30ac3628602cbd17d2765bc3f2cb122 (patch)
treea6f6e1915c8b7886e1f6eed2063f5e65d1fe10ea /sound/core
parent467be357c622bb33235a4b810c1e3c3ab509c129 (diff)
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>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/seq_ports.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c
index 794a341bf0e5..52b279b7b030 100644
--- a/sound/core/seq/seq_ports.c
+++ b/sound/core/seq/seq_ports.c
@@ -134,7 +134,7 @@ struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
134 if (snd_BUG_ON(!client)) 134 if (snd_BUG_ON(!client))
135 return NULL; 135 return NULL;
136 136
137 if (client->num_ports >= SNDRV_SEQ_MAX_PORTS - 1) { 137 if (client->num_ports >= SNDRV_SEQ_MAX_PORTS) {
138 pr_warn("ALSA: seq: too many ports for client %d\n", client->number); 138 pr_warn("ALSA: seq: too many ports for client %d\n", client->number);
139 return NULL; 139 return NULL;
140 } 140 }