We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91e8115 commit d2e639dCopy full SHA for d2e639d
drivers/mtd/nand/raw/ingenic/jz4740_ecc.c
@@ -90,8 +90,8 @@ static int jz4740_ecc_calculate(struct ingenic_ecc *ecc,
90
* If the written data is completely 0xff, we also want to write 0xff as
91
* ECC, otherwise we will get in trouble when doing subpage writes.
92
*/
93
- if (memcmp(ecc_code, empty_block_ecc, ARRAY_SIZE(empty_block_ecc)) == 0)
94
- memset(ecc_code, 0xff, ARRAY_SIZE(empty_block_ecc));
+ if (memcmp(ecc_code, empty_block_ecc, sizeof(empty_block_ecc)) == 0)
+ memset(ecc_code, 0xff, sizeof(empty_block_ecc));
95
96
return 0;
97
}
0 commit comments