From: Masahiro Yamada <yamada.masahiro@socionext.com> To: linux-mtd@lists.infradead.org Cc: Masahiro Yamada <yamada.masahiro@socionext.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Boris Brezillon <boris.brezillon@free-electrons.com>, Brian Norris <computersforpeace@gmail.com>, Richard Weinberger <richard@nod.at>, David Woodhouse <dwmw2@infradead.org>, linux-mediatek@lists.infradead.org, Matthias Brugger <matthias.bgg@gmail.com> Subject: [PATCH 14/22] mtd: nand: mediatek: return error code of nand_scan_ident/tail() on error Date: Fri, 4 Nov 2016 19:43:02 +0900 [thread overview] Message-ID: <1478256190-7452-15-git-send-email-yamada.masahiro@socionext.com> (raw) In-Reply-To: <1478256190-7452-1-git-send-email-yamada.masahiro@socionext.com> The nand_scan_ident/tail() returns an appropriate error value when it fails. Use it instead of the fixed error code -ENODEV. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- drivers/mtd/nand/mtk_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c index 5223a21..6c3eed3 100644 --- a/drivers/mtd/nand/mtk_nand.c +++ b/drivers/mtd/nand/mtk_nand.c @@ -1297,7 +1297,7 @@ static int mtk_nfc_nand_chip_init(struct device *dev, struct mtk_nfc *nfc, ret = nand_scan_ident(mtd, nsels, NULL); if (ret) - return -ENODEV; + return ret; /* store bbt magic in page, cause OOB is not protected */ if (nand->bbt_options & NAND_BBT_USE_FLASH) @@ -1323,7 +1323,7 @@ static int mtk_nfc_nand_chip_init(struct device *dev, struct mtk_nfc *nfc, ret = nand_scan_tail(mtd); if (ret) - return -ENODEV; + return ret; ret = mtd_device_parse_register(mtd, NULL, NULL, NULL, 0); if (ret) { -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: yamada.masahiro@socionext.com (Masahiro Yamada) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 14/22] mtd: nand: mediatek: return error code of nand_scan_ident/tail() on error Date: Fri, 4 Nov 2016 19:43:02 +0900 [thread overview] Message-ID: <1478256190-7452-15-git-send-email-yamada.masahiro@socionext.com> (raw) In-Reply-To: <1478256190-7452-1-git-send-email-yamada.masahiro@socionext.com> The nand_scan_ident/tail() returns an appropriate error value when it fails. Use it instead of the fixed error code -ENODEV. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- drivers/mtd/nand/mtk_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c index 5223a21..6c3eed3 100644 --- a/drivers/mtd/nand/mtk_nand.c +++ b/drivers/mtd/nand/mtk_nand.c @@ -1297,7 +1297,7 @@ static int mtk_nfc_nand_chip_init(struct device *dev, struct mtk_nfc *nfc, ret = nand_scan_ident(mtd, nsels, NULL); if (ret) - return -ENODEV; + return ret; /* store bbt magic in page, cause OOB is not protected */ if (nand->bbt_options & NAND_BBT_USE_FLASH) @@ -1323,7 +1323,7 @@ static int mtk_nfc_nand_chip_init(struct device *dev, struct mtk_nfc *nfc, ret = nand_scan_tail(mtd); if (ret) - return -ENODEV; + return ret; ret = mtd_device_parse_register(mtd, NULL, NULL, NULL, 0); if (ret) { -- 1.9.1
next prev parent reply other threads:[~2016-11-04 10:42 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-11-04 10:42 [PATCH 00/22] mtd: nand: return error code of nand_scan(_ident,_tail) on error Masahiro Yamada 2016-11-04 10:42 ` [PATCH 00/22] mtd: nand: return error code of nand_scan(_ident, _tail) " Masahiro Yamada 2016-11-04 10:42 ` Masahiro Yamada 2016-11-04 10:42 ` [PATCH 01/22] mtd: nand: ams-delta: return error code of nand_scan() " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 02/22] mtd: nand: cmx270: " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 03/22] mtd: nand: cs553x: " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 04/22] mtd: nand: gpio: " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 05/22] mtd: nand: mpc5121: " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 06/22] mtd: nand: tmio: " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 07/22] mtd: nand: orion: " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 08/22] mtd: nand: pasemi: " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 09/22] mtd: nand: plat_nand: " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 10/22] mtd: nand: atmel: return error code of nand_scan_ident/tail() " Masahiro Yamada 2016-11-04 10:42 ` [PATCH 11/22] mtd: nand: brcmnand: " Masahiro Yamada 2016-11-04 10:43 ` [PATCH 12/22] mtd: nand: fsmc: " Masahiro Yamada 2016-11-04 10:43 ` [PATCH 13/22] mtd: nand: lpc32xx: " Masahiro Yamada 2016-11-04 10:43 ` Masahiro Yamada 2016-11-06 1:37 ` Vladimir Zapolskiy 2016-11-06 1:37 ` Vladimir Zapolskiy 2016-11-06 18:27 ` Boris Brezillon 2016-11-06 18:27 ` Boris Brezillon 2016-11-07 0:30 ` Vladimir Zapolskiy 2016-11-07 0:30 ` Vladimir Zapolskiy 2016-11-04 10:43 ` Masahiro Yamada [this message] 2016-11-04 10:43 ` [PATCH 14/22] mtd: nand: mediatek: " Masahiro Yamada 2016-11-04 10:43 ` [PATCH 15/22] mtd: nand: mxc: " Masahiro Yamada 2016-11-04 10:43 ` [PATCH 16/22] mtd: nand: omap2: " Masahiro Yamada 2016-11-04 10:43 ` [PATCH 17/22] mtd: nand: vf610: " Masahiro Yamada 2016-11-04 10:43 ` [PATCH 18/22] mtd: nand: cafe: return error code of nand_scan_ident() " Masahiro Yamada 2016-11-04 10:43 ` [PATCH 19/22] mtd: nand: hisi504: " Masahiro Yamada 2016-11-04 10:43 ` [PATCH 20/22] mtd: nand: pxa3xx: " Masahiro Yamada 2016-11-04 10:43 ` [PATCH 21/22] mtd: nand: nandsim: remove unneeded checks for nand_scan_ident/tail() Masahiro Yamada 2016-11-04 10:43 ` [PATCH 22/22] mtd: nand: socrates: use nand_scan() for nand_scan_ident/tail() combo Masahiro Yamada 2016-11-05 7:34 ` [PATCH 00/22] mtd: nand: return error code of nand_scan(_ident, _tail) on error Marek Vasut 2016-11-05 7:34 ` Marek Vasut 2016-11-06 22:55 ` [PATCH 00/22] mtd: nand: return error code of nand_scan(_ident,_tail) " Boris Brezillon 2016-11-06 22:55 ` Boris Brezillon 2016-11-06 22:55 ` Boris Brezillon
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=1478256190-7452-15-git-send-email-yamada.masahiro@socionext.com \ --to=yamada.masahiro@socionext.com \ --cc=boris.brezillon@free-electrons.com \ --cc=computersforpeace@gmail.com \ --cc=dwmw2@infradead.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=linux-mtd@lists.infradead.org \ --cc=matthias.bgg@gmail.com \ --cc=richard@nod.at \ /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: linkBe 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.