]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: docg4: fix the probe function error path
authorMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 25 Feb 2018 22:09:14 +0000 (23:09 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 18 Jul 2018 07:24:15 +0000 (09:24 +0200)
commit59c40b11f86cb6afeef65615536aa8947c280080
treeb73c86e0092ef1122d5e1c60b85c517f156d900a
parentc62b30b6de33be258f5af3972770390fa21cd464
mtd: rawnand: docg4: fix the probe function error path

nand_release() should not be called on an MTD device that has not been
registered. While it should work thanks to the checks done in
mtd_device_unregister() it's a bad practice to cleanup/release
something that has not previously been initialized/allocated.

Rework the error path to follow this rule.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/docg4.c