]> git.itanic.dy.fi Git - linux-stable/commit
mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 21 Aug 2021 07:58:45 +0000 (09:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 10:28:04 +0000 (12:28 +0200)
commit9da1fb128c5492fb7204eabf32d2f80575beed23
treedc174fc779763bba9c3f29db63347f31f4befeb8
parent5402b31c0c46fde28bbbc7993ce0d2823847d80c
mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'

[ Upstream commit 6b430c7595e4eb95fae8fb54adc3c3ce002e75ae ]

A successful 'init_rs_non_canonical()' call should be balanced by a
corresponding 'free_rs()' call in the error handling path of the probe, as
already done in the remove function.

Update the error handling path accordingly.

Fixes: 8c61b7a7f4d4 ("[MTD] [NAND] Use rslib for CAFÉ ECC")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/fd313d3fb787458bcc73189e349f481133a2cdc9.1629532640.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/nand/raw/cafe_nand.c