mtd: rawnand: oxnas: Release all devices in the _remove() path
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 19 May 2020 13:00:11 +0000 (15:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:15 +0000 (09:34 +0200)
commit39560d89856781a89be875a152990940ad3f5fed
tree48c1bdbd868dceeac3d8f07923d94621241bd65d
parentf890e4f1f9dd9e2f386ccd1d22634ca6653026ff
mtd: rawnand: oxnas: Release all devices in the _remove() path

commit 0a5f45e57e35d0840bedb816974ce2e63406cd8b upstream.

oxnans_nand_remove() should release all MTD devices and clean all NAND
devices, not only the first one registered.

Fixes: 668592492409 ("mtd: nand: Add OX820 NAND Support")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200519130035.1883-39-miquel.raynal@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/raw/oxnas_nand.c