[PATCH v2 1/4] mtd: rawnand: qcom: parse boot partitions before registering MTD

Konrad Dybcio konrad.dybcio at oss.qualcomm.com
Mon Nov 9 05:32:39 PST 2026


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 at vger.kernel.org
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio at oss.qualcomm.com>

Konrad



More information about the linux-mtd mailing list