dect
/
linux-2.6
Archived
13
0
Fork 0

staging: spectra: off by one

g_pBlockTable has only DeviceInfo.wDataBlockNum elements.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Vasiliy Kulikov 2010-09-19 16:54:40 +04:00 committed by Greg Kroah-Hartman
parent b1f5f54e91
commit 340362abb9
1 changed files with 1 additions and 1 deletions

View File

@ -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);