hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/mtd/nand/spi/toshiba.c
....@@ -73,7 +73,7 @@
7373 {
7474 struct nand_device *nand = spinand_to_nand(spinand);
7575 u8 mbf = 0;
76
- struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, &mbf);
76
+ struct spi_mem_op op = SPINAND_GET_FEATURE_OP(0x30, spinand->scratchbuf);
7777
7878 switch (status & STATUS_ECC_MASK) {
7979 case STATUS_ECC_NO_BITFLIPS:
....@@ -92,7 +92,7 @@
9292 if (spi_mem_exec_op(spinand->spimem, &op))
9393 return nanddev_get_ecc_requirements(nand)->strength;
9494
95
- mbf >>= 4;
95
+ mbf = *(spinand->scratchbuf) >> 4;
9696
9797 if (WARN_ON(mbf > nanddev_get_ecc_requirements(nand)->strength || !mbf))
9898 return nanddev_get_ecc_requirements(nand)->strength;