From: Fan Zhang Date: Fri, 7 Jul 2017 05:17:30 +0000 (+0100) Subject: crypto/scheduler: fix slave name parsing X-Git-Tag: spdx-start~2413 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=829d1327310be6d79ad8d6617f7abcc1ad1ad202;p=dpdk.git crypto/scheduler: fix slave name parsing This patch fixes the incorrect index checking in parse_slave function. Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver") Cc: stable@dpdk.org Signed-off-by: Fan Zhang Acked-by: Pablo de Lara --- diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c index 0f57fbefdd..400fc4f149 100644 --- a/drivers/crypto/scheduler/scheduler_pmd.c +++ b/drivers/crypto/scheduler/scheduler_pmd.c @@ -325,7 +325,7 @@ parse_slave_arg(const char *key __rte_unused, { struct scheduler_init_params *param = extra_args; - if (param->nb_slaves >= RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES - 1) { + if (param->nb_slaves >= RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES) { CS_LOG_ERR("Too many slaves.\n"); return -ENOMEM; }