]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: free vendor-specific resources in init failure paths
authorBrian Norris <computersforpeace@gmail.com>
Tue, 2 May 2017 00:04:53 +0000 (17:04 -0700)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 22 May 2017 07:42:29 +0000 (09:42 +0200)
commit71a0644b56027680126107adc6c38ddfd5da8573
tree643531c181864b2fd26246113b4b48283e3c6817
parentefd489eece3bc89ed8658721ce2e73a2eaa30d23
mtd: nand: free vendor-specific resources in init failure paths

If we fail any time after calling nand_detect(), then we don't call the
vendor-specific ->cleanup() callback, and we'll leak any resources the
vendor-specific code might have allocated.

Mark the "fix" against the first commit that started allocating anything
in ->init().

Fixes: 50c71c28a7f9 ("mtd: nand: hynix: Add read-retry support for 1x nm MLC NANDs")
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/nand_base.c