]> git.baikalelectronics.ru Git - kernel.git/commit
[MTD] [NAND] Casting bug in nand_default_block_markbad
authorAndre Renaud <andre@bluewatersys.com>
Tue, 17 Apr 2007 17:50:59 +0000 (13:50 -0400)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 17 Apr 2007 17:50:59 +0000 (13:50 -0400)
commitd74b70acb611ba8fe19d5f24680c2bcab05c69ba
tree061cab08eb3a95d3036d780895c1cc88972d8e7a
parent024442bd54604dbdfe7b3955e0340c598ecb9d7a
[MTD] [NAND] Casting bug in nand_default_block_markbad

There is a slight bug in nand_default_block_markbad, where the offset is
cast to an integer, prior to being shifted. This means that on large
offsets, it is incorrectly doing a signed shift & losing bits. Fixed
this by doing the cast after the shift (as is done elsewhere in the code).

Signed-off-by: Andre Renaud <andre@bluewatersys.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/nand/nand_base.c