]> Gentwo Git Trees - linux/.git/commit
mtd: rawnand: omap2: fix device leak on probe failure
authorJohan Hovold <johan@kernel.org>
Mon, 22 Sep 2025 15:22:04 +0000 (17:22 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 29 Sep 2025 15:55:40 +0000 (17:55 +0200)
commitfa1f26b48fe43195aa0ac4badf5651063590326f
tree1b8f22737c10053dac26801bdf13ab1435693602
parent8ed4728eb9f10b57c3eb02e0f6933a89ffcb8a91
mtd: rawnand: omap2: fix device leak on probe failure

Make sure to drop the reference to the elm device taken by
of_find_device_by_node() during probe on errors and on driver unload.

Fixes: 62116e5171e0 ("mtd: nand: omap2: Support for hardware BCH error correction.")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/omap2.c