Commit 340362ab authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Greg Kroah-Hartman

staging: spectra: off by one

g_pBlockTable has only DeviceInfo.wDataBlockNum elements.
Signed-off-by: default avatarVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b1f5f54e
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment