]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nandsim: remove debugfs entries in error path
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 23 Aug 2017 07:03:04 +0000 (09:03 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 25 Aug 2017 03:59:43 +0000 (20:59 -0700)
commitcfb0e04816a8c5c5f9979d12f9c3e0a70899190c
tree264b840fb18b79f50c5d21bf6f44ee5880a8dad3
parentc6eea46beffe125fe947330947298f0f815fc581
mtd: nandsim: remove debugfs entries in error path

The debugfs entries must be removed before an error is returned in the
probe function. Otherwise another try to load the module fails and when
the debugfs files are accessed without the module loaded, the kernel
still tries to call a function in that module.

Fixes: 2320dfa1b802 ("mtd: nandsim: Introduce debugfs infrastructure")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Richard Weinberger <richard@nod.at>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nandsim.c