From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Richard Weinberger <richard@nod.at>,
kernel@pengutronix.de, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: nandsim: remove debugfs entries in error path
Date: Wed, 23 Aug 2017 10:40:52 +0200 [thread overview]
Message-ID: <20170823104052.2cba1eb2@bbrezillon> (raw)
In-Reply-To: <20170823070304.1336-1-u.kleine-koenig@pengutronix.de>
On Wed, 23 Aug 2017 09:03:04 +0200
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> 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.
Unfortunately this patch conflicts with [1], but feel free to send it to
stable with my
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Regards,
Boris
[1]http://git.infradead.org/l2-mtd.git/commit/e8e3edb95ce6a146bc774b6cfad3553f4383edc8
>
> Fixes: 5346c27c5fed ("mtd: nandsim: Introduce debugfs infrastructure")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/mtd/nand/nandsim.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
> index 03a0d057bf2f..e4211c3cc49b 100644
> --- a/drivers/mtd/nand/nandsim.c
> +++ b/drivers/mtd/nand/nandsim.c
> @@ -2373,6 +2373,7 @@ static int __init ns_init_module(void)
> return 0;
>
> err_exit:
> + nandsim_debugfs_remove(nand);
> free_nandsim(nand);
> nand_release(nsmtd);
> for (i = 0;i < ARRAY_SIZE(nand->partitions); ++i)
next prev parent reply other threads:[~2017-08-23 8:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 7:03 [PATCH] mtd: nandsim: remove debugfs entries in error path Uwe Kleine-König
2017-08-23 8:40 ` Richard Weinberger
2017-08-23 8:40 ` Boris Brezillon [this message]
2017-08-23 9:12 ` Uwe Kleine-König
2017-08-25 4:22 ` Brian Norris
2017-08-25 5:41 ` Uwe Kleine-König
2017-08-25 21:35 ` Brian Norris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170823104052.2cba1eb2@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=kernel@pengutronix.de \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.