From: Miquel Raynal <miquel.raynal@bootlin.com>
To: <linux-mtd@lists.infradead.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>, stable@vger.kernel.org
Subject: [PATCH v2 53/62] mtd: rawnand: sunxi: Fix the probe error path
Date: Tue, 19 May 2020 15:00:26 +0200 [thread overview]
Message-ID: <20200519130035.1883-54-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20200519130035.1883-1-miquel.raynal@bootlin.com>
nand_release() is supposed be called after MTD device registration.
Here, only nand_scan() happened, so use nand_cleanup() instead.
Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: stable@vger.kernel.org
---
drivers/mtd/nand/raw/sunxi_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 26d862213cac..9f51fd20a52e 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -2004,7 +2004,7 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc,
ret = mtd_device_register(mtd, NULL, 0);
if (ret) {
dev_err(dev, "failed to register mtd device: %d\n", ret);
- nand_release(nand);
+ nand_cleanup(nand);
return ret;
}
--
2.20.1
next prev parent reply other threads:[~2020-05-19 13:01 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200519130035.1883-1-miquel.raynal@bootlin.com>
2020-05-19 12:59 ` [PATCH v2 12/62] mtd: rawnand: diskonchip: Fix the probe error path Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:08 ` Miquel Raynal
2020-05-19 12:59 ` [PATCH v2 21/62] mtd: rawnand: ingenic: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:07 ` Miquel Raynal
2020-05-19 13:00 ` [PATCH v2 27/62] mtd: rawnand: mtk: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:06 ` Miquel Raynal
2020-05-19 13:00 ` [PATCH v2 33/62] mtd: rawnand: orion: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:06 ` Miquel Raynal
2020-05-19 13:00 ` [PATCH v2 36/62] mtd: rawnand: oxnas: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:05 ` Miquel Raynal
2020-05-19 13:00 ` [PATCH v2 40/62] mtd: rawnand: pasemi: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:05 ` Miquel Raynal
2020-05-19 13:00 ` [PATCH v2 42/62] mtd: rawnand: plat_nand: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:05 ` Miquel Raynal
2020-05-19 13:00 ` [PATCH v2 48/62] mtd: rawnand: sharpsl: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:04 ` Miquel Raynal
2020-05-19 13:00 ` [PATCH v2 50/62] mtd: rawnand: socrates: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:04 ` Miquel Raynal
2020-05-19 13:00 ` Miquel Raynal [this message]
2020-05-22 0:12 ` [PATCH v2 53/62] mtd: rawnand: sunxi: " Sasha Levin
2020-05-24 19:04 ` Miquel Raynal
2020-05-19 13:00 ` [PATCH v2 56/62] mtd: rawnand: tmio: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:04 ` Miquel Raynal
2020-05-19 13:00 ` [PATCH v2 60/62] mtd: rawnand: xway: " Miquel Raynal
2020-05-22 0:12 ` Sasha Levin
2020-05-24 19:03 ` Miquel Raynal
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=20200519130035.1883-54-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=linux-mtd@lists.infradead.org \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).