From: Brian Norris <computersforpeace@gmail.com>
To: <linux-mtd@lists.infradead.org>
Cc: Brian Norris <computersforpeace@gmail.com>
Subject: [PATCH 5/6] mtd: nand_bbt: handle error case for nand_create_badblock_pattern()
Date: Tue, 20 May 2014 23:17:02 -0700 [thread overview]
Message-ID: <1400653023-25757-6-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1400653023-25757-1-git-send-email-computersforpeace@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
drivers/mtd/nand/nand_bbt.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 6cbf8768a0a4..7f0c3b4c2a4f 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -1282,6 +1282,7 @@ static int nand_create_badblock_pattern(struct nand_chip *this)
int nand_default_bbt(struct mtd_info *mtd)
{
struct nand_chip *this = mtd->priv;
+ int ret;
/* Is a flash based bad block table requested? */
if (this->bbt_options & NAND_BBT_USE_FLASH) {
@@ -1300,8 +1301,11 @@ int nand_default_bbt(struct mtd_info *mtd)
this->bbt_md = NULL;
}
- if (!this->badblock_pattern)
- nand_create_badblock_pattern(this);
+ if (!this->badblock_pattern) {
+ ret = nand_create_badblock_pattern(this);
+ if (ret)
+ return ret;
+ }
return nand_scan_bbt(mtd, this->badblock_pattern);
}
--
1.7.9.5
next prev parent reply other threads:[~2014-05-21 6:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 6:16 [PATCH 0/6] mtd: small cleanups Brian Norris
2014-05-21 6:16 ` [PATCH 1/6] mtd: pfow: remove unused variable Brian Norris
2014-05-21 6:16 ` [PATCH 2/6] mtd: slram: fix unused variable warning Brian Norris
2014-05-21 6:17 ` [PATCH 3/6] mtd: maps: sc520cdp: fix warnings Brian Norris
2014-05-21 6:17 ` [PATCH 4/6] mtd: nand_bbt: remove unused variable Brian Norris
2014-05-21 6:17 ` Brian Norris [this message]
2014-05-21 6:17 ` [PATCH 6/6] mtd: nand: r852: correct write_buf loop bounds Brian Norris
2014-05-28 7:07 ` [PATCH 0/6] mtd: small cleanups Brian Norris
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=1400653023-25757-6-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.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).