From 263974d918474d17b5963d0b22fbc81729ce0479 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sun, 28 Mar 2010 14:48:10 +0300 Subject: [PATCH] Staging: otus: hpani: using the wrong variable We're updating the "HpPriv->ani" array here so we should use that to determine the end of the for loop. "HpPriv->ani" has 50 elements and "wd->regulationTable.allowChannel" has 59 elements. Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/hal/hpani.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/otus/hal/hpani.c b/drivers/staging/otus/hal/hpani.c index 0afecd8c2de..d401504f200 100644 --- a/drivers/staging/otus/hal/hpani.c +++ b/drivers/staging/otus/hal/hpani.c @@ -96,7 +96,7 @@ void zfHpAniAttach(zdev_t* dev) HpPriv->hasHwPhyCounters = 1; memset((char *)&HpPriv->ani, 0, sizeof(HpPriv->ani)); - for (i = 0; i < N(wd->regulationTable.allowChannel); i++) + for (i = 0; i < ARRAY_SIZE(HpPriv->ani); i++) { /* New ANI stuff */ HpPriv->ani[i].ofdmTrigHigh = ZM_HAL_ANI_OFDM_TRIG_HIGH; -- 2.39.3