stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: <linux-mtd@lists.infradead.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	stable@vger.kernel.org, Paul Cercueil <paul@crapouillou.net>,
	Harvey Hunt <harveyhuntnexus@gmail.com>
Subject: [PATCH v2 21/62] mtd: rawnand: ingenic: Fix the probe error path
Date: Tue, 19 May 2020 14:59:54 +0200	[thread overview]
Message-ID: <20200519130035.1883-22-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.

There is no real Fixes tag applying here as the use of nand_release()
in this driver predates the introduction of nand_cleanup() in
commit d44154f969a4 ("mtd: nand: Provide nand_cleanup() function to free NAND related resources")
which makes this change possible. Hence, pointing it as the commit to
fix for backporting purposes, even if this commit is not introducing
any bug makes sense.

Fixes: d44154f969a4 ("mtd: nand: Provide nand_cleanup() function to free NAND related resources")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: stable@vger.kernel.org
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Harvey Hunt <harveyhuntnexus@gmail.com>
---
 drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c
index e7bd845fdbf5..3bfb6fa8bad9 100644
--- a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c
+++ b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c
@@ -376,7 +376,7 @@ static int ingenic_nand_init_chip(struct platform_device *pdev,
 
 	ret = mtd_device_register(mtd, NULL, 0);
 	if (ret) {
-		nand_release(chip);
+		nand_cleanup(chip);
 		return ret;
 	}
 
-- 
2.20.1


  parent reply	other threads:[~2020-05-19 13:00 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 ` Miquel Raynal [this message]
2020-05-22  0:12   ` [PATCH v2 21/62] mtd: rawnand: ingenic: " 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 ` [PATCH v2 53/62] mtd: rawnand: sunxi: " Miquel Raynal
2020-05-22  0:12   ` 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-22-miquel.raynal@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=harveyhuntnexus@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=paul@crapouillou.net \
    --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).