mtd: spinand: propagate spinand_wait() errors from spinand_write_page()
authorGabor Juhos <j4g8y7@gmail.com>
Tue, 30 Sep 2025 00:21:04 +0000 (03:21 +0300)
committerMichael Trimarchi <michael@amarulasolutions.com>
Sun, 5 Oct 2025 18:26:24 +0000 (20:26 +0200)
commitf61362c24f5d827005cca5b46887400625faf540
tree495ae54701657cb8dbfc6e6cfc11fc0daa0ba027
parentccc6b42adcabd0fb16103410985dae7d96f2036a
mtd: spinand: propagate spinand_wait() errors from spinand_write_page()

Since commit 3d1f08b032dc ("mtd: spinand: Use the external ECC engine
logic") the spinand_write_page() function ignores the errors returned
by spinand_wait(). Change the code to propagate those up to the stack
as it was done before the offending change.

This is a port of linux commit
091d9e35b85b ("mtd: spinand: propagate spinand_wait() errors from spinand_write_page()")

Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> # U-Boot port
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/mtd/nand/spi/core.c