]> git.ipfire.org Git - thirdparty/linux.git/commit
mtd: spi-nor: hisi-sfc: fix refcounting bug in hisi_spi_nor_register_all()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 6 Feb 2026 13:38:54 +0000 (16:38 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 6 Feb 2026 14:22:42 +0000 (15:22 +0100)
commit6c7860aa28b81b7e909b8d2072ed76fa22db6eda
treebe974655108ec4ffff89942e3e213c77f5825326
parente82269e7cb93a2d33368418be4ee56015b4adc27
mtd: spi-nor: hisi-sfc: fix refcounting bug in hisi_spi_nor_register_all()

This was converted to a _scoped() loop but this of_node_put() was
accidentally left behind which is a double free.

Fixes: aa8cb72c2018 ("mtd: spi-nor: hisi-sfc: Simplify with scoped for each OF child loop")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/spi-nor/controllers/hisi-sfc.c