int ret = CRYPTO_OK;
struct spacc_job *job = NULL;
- if (handle < 0 || handle > SPACC_MAX_JOBS)
+ if (handle < 0 || handle >= SPACC_MAX_JOBS)
return -ENXIO;
job = &spacc->job[handle];
struct spacc_job *job;
int ret = CRYPTO_OK, proc_len;
- if (job_idx < 0 || job_idx > SPACC_MAX_JOBS)
+ if (job_idx < 0 || job_idx >= SPACC_MAX_JOBS)
return -ENXIO;
switch (prio) {
int ret = CRYPTO_OK;
struct spacc_job *job;
- if (jobid < 0 || jobid > SPACC_MAX_JOBS)
+ if (jobid < 0 || jobid >= SPACC_MAX_JOBS)
return -ENXIO;
job = &spacc->job[jobid];
struct spacc_ctx *ctx = NULL;
struct spacc_job *job = NULL;
- if (job_idx < 0 || job_idx > SPACC_MAX_JOBS) {
+ if (job_idx < 0 || job_idx >= SPACC_MAX_JOBS) {
pr_debug("ERR: Invalid Job id specified (out of range)\n");
return -ENXIO;
}