nand_release() is supposed be called after MTD device registration. Here, only nand_scan() happened, so use nand_cleanup() instead.
There is no Fixes tag applying here as the use of nand_release() in this driver predates by far the introduction of nand_cleanup() in commit d44154f969a4 ("mtd: nand: Provide nand_cleanup() function to free NAND related resources") which makes this change possible. However, pointing this commit as the culprit for backporting purposes 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 --- drivers/mtd/nand/raw/sharpsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/sharpsl.c b/drivers/mtd/nand/raw/sharpsl.c index b47a9eaff89b..d8c52a016080 100644 --- a/drivers/mtd/nand/raw/sharpsl.c +++ b/drivers/mtd/nand/raw/sharpsl.c @@ -183,7 +183,7 @@ static int sharpsl_nand_probe(struct platform_device *pdev) return 0;
err_add: - nand_release(this); + nand_cleanup(this);
err_scan: iounmap(sharpsl->io);
Hi
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag fixing commit: d44154f969a4 ("mtd: nand: Provide nand_cleanup() function to free NAND related resources").
The bot has tested the following trees: v5.6.13, v5.4.41, v4.19.123, v4.14.180, v4.9.223.
v5.6.13: Build OK! v5.4.41: Build OK! v4.19.123: Failed to apply! Possible dependencies: 59ac276f2227 ("mtd: rawnand: Pass a nand_chip object to nand_release()")
v4.14.180: Failed to apply! Possible dependencies: 02f26ecf8c77 ("mtd: nand: add reworked Marvell NAND controller driver") 256c4fc76a80 ("mtd: rawnand: add a way to pass an ID table with nand_scan()") 39b77c586e17 ("mtd: rawnand: fsl_elbc: fix probe function error path") 59ac276f2227 ("mtd: rawnand: Pass a nand_chip object to nand_release()") 63fa37f0c512 ("mtd: rawnand: Replace printk() with appropriate pr_*() macro") 97d90da8a886 ("mtd: nand: provide several helpers to do common NAND operations") 98732da1a08e ("mtd: rawnand: do not export nand_scan_[ident|tail]() anymore") acfc33091f7a ("mtd: rawnand: fsl_ifc: fix probe function error path")
v4.9.223: Failed to apply! Possible dependencies: 24755a55b01f ("Documentation/00-index: update for new core-api folder") 4ad4b21b1b81 ("docs-rst: convert usb docbooks to ReST") 59ac276f2227 ("mtd: rawnand: Pass a nand_chip object to nand_release()") 609f212f6a12 ("docs-rst: convert mtdnand book to ReST") 66115335fbb4 ("docs: Fix build failure") 7ddedebb03b7 ("ALSA: doc: ReSTize writing-an-alsa-driver document") 8551914a5e19 ("ALSA: doc: ReSTize alsa-driver-api document") 90f9f118b75c ("docs-rst: convert filesystems book to ReST") 93dc3a112bf8 ("doc: Convert the debugobjects DocBook template to sphinx") c441a4781ff1 ("crypto: doc - remove crypto API DocBook") d6ba7a9c8b5a ("doc: Sphinxify the tracepoint docbook") e7f08ffb1855 ("Documentation/workqueue.txt: convert to ReST markup") f3fc83e55533 ("docs: Fix htmldocs build failure")
NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
On Tue, 2020-05-19 at 13:00:21 UTC, Miquel Raynal wrote:
nand_release() is supposed be called after MTD device registration. Here, only nand_scan() happened, so use nand_cleanup() instead.
There is no Fixes tag applying here as the use of nand_release() in this driver predates by far the introduction of nand_cleanup() in commit d44154f969a4 ("mtd: nand: Provide nand_cleanup() function to free NAND related resources") which makes this change possible. However, pointing this commit as the culprit for backporting purposes 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
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.
Miquel
linux-stable-mirror@lists.linaro.org