* [PATCH] mtd: spinand: cleanup ECC engine when spinand_randomizer_init() fails
@ 2026-11-19 8:14 Gabor Juhos
2026-11-19 12:37 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Gabor Juhos @ 2026-11-19 8:14 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Cheng Ming Lin
Cc: linux-mtd, linux-kernel, stable, Gabor Juhos
When the spinand_randomizer_init() fails, the code jumps to the
'err_cleanup_nanddev' label and the code leaves the ECC engine
initialized.
Change the respective goto statement to use the correct label which
ensures that the ECC engine gets cleaned up correctly.
Cc: stable@vger.kernel.org
Fixes: 54e1bc80af0c ("mtd: spinand: Add support for randomizer")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
drivers/mtd/nand/spi/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 18bba02fbd31..f6741d121b70 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -1982,7 +1982,7 @@ static int spinand_init(struct spinand_device *spinand)
spinand_cont_read_init(spinand);
ret = spinand_randomizer_init(spinand);
if (ret)
- goto err_cleanup_nanddev;
+ goto err_cleanup_ecc_engine;
mtd->_read_oob = spinand_mtd_read;
mtd->_write_oob = spinand_mtd_write;
---
base-commit: 760d2efe91a84363d25c1051a10572242e75fe86
change-id: 20261118-spinand-cleanup-ecc-engine-da1af0ceae46
Best regards,
--
Gabor Juhos <j4g8y7@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: spinand: cleanup ECC engine when spinand_randomizer_init() fails
2026-11-19 8:14 [PATCH] mtd: spinand: cleanup ECC engine when spinand_randomizer_init() fails Gabor Juhos
@ 2026-11-19 12:37 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2026-11-19 12:37 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Cheng Ming Lin, Gabor Juhos
Cc: linux-mtd, linux-kernel, stable
On Thu, 19 Nov 2026 09:14:46 +0100, Gabor Juhos wrote:
> When the spinand_randomizer_init() fails, the code jumps to the
> 'err_cleanup_nanddev' label and the code leaves the ECC engine
> initialized.
>
> Change the respective goto statement to use the correct label which
> ensures that the ECC engine gets cleaned up correctly.
>
> [...]
Applied to nand/next, thanks!
[1/1] mtd: spinand: cleanup ECC engine when spinand_randomizer_init() fails
commit: 8af49d43433c305e0fa773ea705eeb7d08b6ceb6
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-19 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 8:14 [PATCH] mtd: spinand: cleanup ECC engine when spinand_randomizer_init() fails Gabor Juhos
2026-11-19 12:37 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®