[PATCH] mtd: nand: initialize ops.mode

Artem Bityutskiy dedekind1 at gmail.com
Sun Oct 16 08:04:47 EDT 2011


On Fri, 2011-10-14 at 20:09 -0700, Brian Norris wrote:
> Our `ops' information was converted to a local variable recently, and
> apparently, old code relied on the fact that the global version was
> often left in a valid mode. We can't make this assumption on local
> structs, and we shouldn't be relying on a previous state anyway.
> 
> Instead, we initialize mode to 0 for don't-care situations (i.e., the
> operation does not use OOB anyway) and MTD_OPS_PLACE_OOB when we want to
> place OOB data.
> 
> This fixes a bug with nand_default_block_markbad(), where we catch on
> the BUG() call in nand_fill_oob():

Pushed to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list