openwrt/target/linux/mediatek/patches-5.15/121-hack-spi-nand-1b-bbm.patch
Daniel Golle 9b4041fa2e
mediatek: refresh patches for Linux 5.15
Run `make target/linux/refresh` to align patches with OpenWrt style.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-04-30 16:00:15 +01:00

21 lines
645 B
Diff

--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -714,7 +714,7 @@ static int spinand_mtd_write(struct mtd_
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),
@@ -725,7 +725,7 @@ static bool spinand_isbad(struct nand_de
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;