[PATCH v2] mtd: rawnand: lpc32xx_slc: fix GPIO descriptor leak

Miquel Raynal miquel.raynal at bootlin.com
Tue Nov 4 00:55:37 PST 2025


Hi,

> diff --git a/drivers/mtd/nand/raw/lpc32xx_slc.c b/drivers/mtd/nand/raw/lpc32xx_slc.c
> index b54d76547ffb..3ca30e7dce33 100644
> --- a/drivers/mtd/nand/raw/lpc32xx_slc.c
> +++ b/drivers/mtd/nand/raw/lpc32xx_slc.c
> @@ -854,7 +854,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
>  	}
>  
>  	/* Start with WP disabled, if available */
> -	host->wp_gpio = gpiod_get_optional(&pdev->dev, NULL, GPIOD_OUT_LOW);
> +	host->wp_gpio = devm_gpiod_get_optional(&pdev->dev, NULL,
>  	GPIOD_OUT_LOW);

Please send an update on top the previous patch which I already applied.

Thanks,
Miquèl



More information about the linux-arm-kernel mailing list