Re: [PATCH] mtd: rawnand: r852: disable the engine when card registration fails

From: Miquel Raynal

Date: Fri Dec 04 2026 - 16:13:38 EST


On 08/11/2026 at 17:20:55 -07, James Hilliard <james.hilliard1@xxxxxxxxx> wrote:

> r852_register_nand_device() enables the NAND engine before scanning and
> registering the card. If sm_register_device() or device_create_file()
> fails, the error path leaves the engine enabled while card_registered
> remains clear.
>
> A subsequent removal work item sees no registered card and skips
> unregistration. The device removal path also returns immediately from
> r852_unregister_nand_device() in this state, so neither path disables
> the engine.
>
> Disable the engine in the common registration-failure path after any
> required NAND cleanup.
>
> Fixes: 67e054e91924 ("mtd: nand: Add driver for Ricoh xD/SmartMedia reader")
> Cc: stable@xxxxxxxxxxxxxxx
> Link: https://lore.kernel.org/r/sashiko-outbox-204169@xxxxxxxxxx/
> Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>

Seems like there is a conflict with the other patches. Please rebase on
top of nand/next.

Thanks,
Miquèl