diff mbox

[1/2] linux-generic: schedule: fix range check on odp_schedule_group_destroy()

Message ID 1441162216-15540-1-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Sept. 2, 2015, 2:50 a.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/odp_schedule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c
index dc2d75f..b9b47a8 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -685,7 +685,7 @@  int odp_schedule_group_destroy(odp_schedule_group_t group)
 	odp_spinlock_lock(&sched->grp_lock);
 
 	if (group < ODP_CONFIG_SCHED_GRPS &&
-	    group > _ODP_SCHED_GROUP_NAMED &&
+	    group >= _ODP_SCHED_GROUP_NAMED &&
 	    sched->sched_grp[group].name[0] != 0) {
 		odp_thrmask_zero(sched->sched_grp[group].mask);
 		memset(&sched->sched_grp[group].name, 0,