From: Takahiro Kuwano Date: Tue, 3 Dec 2024 02:46:48 +0000 (+0900) Subject: mtd: spinand: Remove write_enable_op() in markbad() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c6858779f1f549442ec2fe2f69800d8e9cd904ce;p=users%2Fjedix%2Flinux-maple.git mtd: spinand: Remove write_enable_op() in markbad() We don't have to call spinand_write_enable_op() in spinand_markbad() as it is called in spinand_write_page(). Fixes: b645ad39d568 ("mtd: spinand: Do not erase the block before writing a bad block marker") Signed-off-by: Takahiro Kuwano Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal --- diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index b1df7f627161..00e1bfa416ce 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -942,10 +942,6 @@ static int spinand_markbad(struct nand_device *nand, const struct nand_pos *pos) if (ret) return ret; - ret = spinand_write_enable_op(spinand); - if (ret) - return ret; - return spinand_write_page(spinand, &req); }