Re: [PATCH v2] mtd: core: skip empty read and write requests

From: Miquel Raynal

Date: Fri Nov 20 2026 - 10:06:17 EST


On Wed, 18 Nov 2026 10:18:36 -0700, James Hilliard wrote:
> When mtd_read() and mtd_write() became wrappers around the OOB helpers,
> they lost their zero-length checks. An empty read at the end of a raw
> NAND device can then compute a die index one past the last die and hit
> the WARN_ON() in nand_select_target().
>
> Return success from the common helpers without calling the driver when
> the request is valid but has neither data nor OOB bytes to transfer.
>
> [...]

Applied to mtd/next, thanks!

[1/1] mtd: core: skip empty read and write requests
commit: 3db54924e7fa664dd6303f3bd0cb1eeceb1f513e

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