]> 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)
commit0e2f1c80506b6176192a1862439f62ac97e7f4b6
tree264b840fb18b79f50c5d21bf6f44ee5880a8dad3
parentb29540c553961cee2fc915b2aa044d05efb55d74
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: f69238673f2a ("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