* [PATCH] staging: spectra: off by one
@ 2010-09-19 12:54 Vasiliy Kulikov
0 siblings, 0 replies; only message in thread
From: Vasiliy Kulikov @ 2010-09-19 12:54 UTC (permalink / raw)
To: kernel-janitors
Cc: Greg Kroah-Hartman, Javier Martinez Canillas, David Woodhouse,
devel, linux-kernel
g_pBlockTable has only DeviceInfo.wDataBlockNum elements.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
compile tested.
drivers/staging/spectra/flash.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/spectra/flash.c b/drivers/staging/spectra/flash.c
index 9b5218b..4e6e451 100644
--- a/drivers/staging/spectra/flash.c
+++ b/drivers/staging/spectra/flash.c
@@ -1604,7 +1604,7 @@ static int get_l2_cache_blks(void)
for (n = 0; n < BLK_NUM_FOR_L2_CACHE; n++) {
blk = find_least_worn_blk_for_l2_cache();
- if (blk > DeviceInfo.wDataBlockNum) {
+ if (blk >= DeviceInfo.wDataBlockNum) {
nand_dbg_print(NAND_DBG_WARN,
"find_least_worn_blk_for_l2_cache: "
"No enough free NAND blocks (n: %d) for L2 Cache!\n", n);
--
1.7.0.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-19 12:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-19 12:54 [PATCH] staging: spectra: off by one Vasiliy Kulikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox