]> git.baikalelectronics.ru Git - kernel.git/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)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 23 Aug 2021 08:58:14 +0000 (10:58 +0200)
commit19870570ea25750c97377b7f65753230ebbe7d9b
treeb9ed66db669b8e700e50ded4f81a75368917adda
parentfbf315ee3e2a8b04e4ed5156cd6ff2a03b153c24
mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'

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: a8895f28738b ("[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
drivers/mtd/nand/raw/cafe_nand.c