Re: [PATCH v2 1/4] mtd: rawnand: qcom: parse boot partitions before registering MTD
From: Konrad Dybcio
Date: Mon Nov 09 2026 - 08:33:25 EST
On 11/8/26 11:42 PM, James Hilliard wrote:
> A boot-partition parsing error currently calls nand_cleanup() after the
> MTD device has already been registered, leaving a published device backed
> by freed chip resources. Registration can also invoke consumers before
> the boot-partition layout is available.
>
> Parse that layout after nand_scan() supplies the geometry but before
> publishing the device. All failures then reach cleanup without leaving a
> registered MTD behind.
>
> Fixes: 862bdedd7f4b ("mtd: nand: raw: qcom_nandc: add support for unprotected spare data pages")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad