Re: [PATCH] mtd: rawnand: macronix: preserve OTP operation errors

From: Miquel Raynal

Date: Fri Dec 04 2026 - 16:33:33 EST


On Sun, 08 Nov 2026 15:33:04 -0700, James Hilliard wrote:
> The OTP read/write helper replaces the result of enabling OTP mode or
> transferring data with the result of disabling OTP mode. Successful cleanup
> therefore hides an earlier failure. The read wrapper can report an empty
> transfer instead of the error, while the write wrapper converts it to
> -ENOSPC because no bytes were reported.
>
> Keep the operation result and the cleanup result separately. Return the
> original error when an operation fails, or the cleanup error when the
> operation succeeded. Still attempt to disable OTP mode after an enable
> failure, since the failed command may already have changed the device.
>
> [...]

Applied to nand/next, thanks!

[1/1] mtd: rawnand: macronix: preserve OTP operation errors
commit: f378f2a1d8dac35b9f33aa2507d4875d4364dd6a

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