Re: [PATCH v4 2/2] mtd: spi-nor: core: Unprepare after interrupted RWW wait

From: Miquel Raynal

Date: Tue Aug 25 2026 - 08:24:34 EST


Hi Runyu,

On 19/08/2026 at 22:03:37 +08, Runyu Xiao <runyu.xiao@xxxxxxxxxx> wrote:

> spi_nor_prep_and_lock() calls spi_nor_prep() before waiting. If the wait
> is interrupted, the controller setup is left active.
>
> Call spi_nor_unprep() before returning an error from each helper.
>
> Fixes: 74df43b3f626 ("mtd: spi-nor: Enhance locking to support reads while writes")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Runyu Xiao <runyu.xiao@xxxxxxxxxx>
>
> Changes in v4:
> - Add the cleanup for interrupted RWW waits as a separate patch.
> - Use the original RWW locking commit in Fixes.

There is already a pending patch for that part:

https://lore.kernel.org/linux-mtd/87o6f7mzbq.fsf@xxxxxxxxxxx/T/#m69e389f70eb3e34c0573bf289cb050825f14b516

Thanks,
Miquèl