* [PATCH] mtd/nand: move pointer dereferencing after the actual check in verify_bbt_descr
@ 2011-02-07 20:48 Stanislav Fomichev
2011-02-11 14:15 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Fomichev @ 2011-02-07 20:48 UTC (permalink / raw)
To: dwmw2; +Cc: linux-mtd
Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
---
drivers/mtd/nand/nand_bbt.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 6ebd869..a1e8b30 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -1101,12 +1101,16 @@ static void mark_bbt_region(struct mtd_info *mtd, struct nand_bbt_descr *td)
static void verify_bbt_descr(struct mtd_info *mtd, struct nand_bbt_descr *bd)
{
struct nand_chip *this = mtd->priv;
- u32 pattern_len = bd->len;
- u32 bits = bd->options & NAND_BBT_NRBITS_MSK;
+ u32 pattern_len;
+ u32 bits;
u32 table_size;
if (!bd)
return;
+
+ pattern_len = bd->len;
+ bits = bd->options & NAND_BBT_NRBITS_MSK;
+
BUG_ON((this->options & NAND_USE_FLASH_BBT_NO_OOB) &&
!(this->options & NAND_USE_FLASH_BBT));
BUG_ON(!bits);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd/nand: move pointer dereferencing after the actual check in verify_bbt_descr
2011-02-07 20:48 [PATCH] mtd/nand: move pointer dereferencing after the actual check in verify_bbt_descr Stanislav Fomichev
@ 2011-02-11 14:15 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2011-02-11 14:15 UTC (permalink / raw)
To: Stanislav Fomichev; +Cc: linux-mtd, dwmw2
On Mon, 2011-02-07 at 23:48 +0300, Stanislav Fomichev wrote:
> Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
> ---
> drivers/mtd/nand/nand_bbt.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
Thanks, although the descriptions had a small issue - you put everything
to the subject and made it too long. I amended it a little and pushed to
l2-mtd-2.6.git tree, thanks.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-11 14:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-07 20:48 [PATCH] mtd/nand: move pointer dereferencing after the actual check in verify_bbt_descr Stanislav Fomichev
2011-02-11 14:15 ` Artem Bityutskiy
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.