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; }
Hi
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag fixing commit: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support").
The bot has tested the following trees: v5.6.13, v5.4.41, v4.19.123, v4.14.180, v4.9.223, v4.4.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")
v4.4.223: Failed to apply! Possible dependencies: 2cca45574007 ("Merge tag 'topic/drm-misc-2016-06-07' of git://anongit.freedesktop.org/drm-intel into drm-next") 47cb398dd75a ("Docs: sphinxify device-drivers.tmpl") 4ad4b21b1b81 ("docs-rst: convert usb docbooks to ReST") 59ac276f2227 ("mtd: rawnand: Pass a nand_chip object to nand_release()") 5b996e93aac3 ("Documentation: include sync_file into DocBook") 609f212f6a12 ("docs-rst: convert mtdnand book to ReST") 90f9f118b75c ("docs-rst: convert filesystems book to ReST") eae1760fc838 ("doc: update/fixup dma-buf related DocBook") 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:26 UTC, Miquel Raynal wrote:
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
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.
Miquel
linux-stable-mirror@lists.linaro.org