2022-04-07 02:05:56 +00:00
|
|
|
--- a/drivers/mtd/nand/spi/core.c
|
|
|
|
+++ b/drivers/mtd/nand/spi/core.c
|
2023-03-31 10:40:31 +00:00
|
|
|
@@ -724,7 +724,7 @@ static int spinand_mtd_write(struct mtd_
|
2022-04-07 02:05:56 +00:00
|
|
|
static bool spinand_isbad(struct nand_device *nand, const struct nand_pos *pos)
|
|
|
|
{
|
|
|
|
struct spinand_device *spinand = nand_to_spinand(nand);
|
|
|
|
- u8 marker[2] = { };
|
|
|
|
+ u8 marker[1] = { };
|
|
|
|
struct nand_page_io_req req = {
|
|
|
|
.pos = *pos,
|
|
|
|
.ooblen = sizeof(marker),
|
2023-03-31 10:40:31 +00:00
|
|
|
@@ -735,7 +735,7 @@ static bool spinand_isbad(struct nand_de
|
2022-04-07 02:05:56 +00:00
|
|
|
|
|
|
|
spinand_select_target(spinand, pos->target);
|
|
|
|
spinand_read_page(spinand, &req);
|
|
|
|
- if (marker[0] != 0xff || marker[1] != 0xff)
|
|
|
|
+ if (marker[0] != 0xff)
|
|
|
|
return true;
|
|
|
|
|
|
|
|
return false;
|