From 95a8e4b86583a4987e3f231ab9d9ed56d2449ba5 Mon Sep 17 00:00:00 2001 From: "Artem B. Bityuckiy" Date: Wed, 9 Feb 2005 14:50:00 +0000 Subject: [PATCH] --- yaml --- r: 4483 b: refs/heads/master c: 41ce921440bd14d9b69b19fbf47d9278582739fe h: refs/heads/master i: 4481: b8812afcddb27659b331bce2758b42fc89937e2b 4479: 3bdd296170dc216b537f41df5c4fd3d0d16b49a2 v: v3 --- [refs] | 2 +- trunk/drivers/mtd/nand/nand_base.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 855c30f86312..12c9a50113aa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0040bf382c77414739c933e4d2ee35ff817d0b99 +refs/heads/master: 41ce921440bd14d9b69b19fbf47d9278582739fe diff --git a/trunk/drivers/mtd/nand/nand_base.c b/trunk/drivers/mtd/nand/nand_base.c index 99abd615a467..1806ffae2452 100644 --- a/trunk/drivers/mtd/nand/nand_base.c +++ b/trunk/drivers/mtd/nand/nand_base.c @@ -59,7 +59,7 @@ * The AG-AND chips have nice features for speed improvement, * which are not supported yet. Read / program 4 pages in one go. * - * $Id: nand_base.c,v 1.131 2005/02/09 12:19:56 gleixner Exp $ + * $Id: nand_base.c,v 1.132 2005/02/09 14:49:56 dedekind Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -461,7 +461,8 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) /* Get block number */ block = ((int) ofs) >> this->bbt_erase_shift; - this->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1); + if (this->bbt) + this->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1); /* Do we have a flash based bad block table ? */ if (this->options & NAND_USE_FLASH_BBT)