Prev: [patch] comedi: off by one issue
Next: Hardware performance events are not counted by "perf" in a 2.6.31.12 KVM guest
From: Dan Carpenter on 28 Mar 2010 07:50 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 <error27(a)gmail.com> diff --git a/drivers/staging/otus/hal/hpani.c b/drivers/staging/otus/hal/hpani.c index 0afecd8..d401504 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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |