Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
This patch fixes the incorrect index checking in parse_slave function. Signed-off-by: Fan Zhang <roy.fan.zh...@intel.com> --- drivers/crypto/scheduler/scheduler_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c index 0f57fbe..400fc4f 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; } -- 2.9.4