mtd: nand: fix MTD_MODE_RAW writes
authorJon Povey <jon.povey@racelogic.co.uk>
Thu, 30 Sep 2010 11:41:34 +0000 (20:41 +0900)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 25 Oct 2010 00:33:37 +0000 (01:33 +0100)
RAW writes were broken by 782ce79a45b3b850b108896fcf7da26754061c8f
which introduced a check of ops->ooboffs in nand_do_write_ops().

When writing in RAW mode this is called with an ops struct on the stack
of mtdchar.c:mtd_write() which does not initialise ops->ooboffs, so it
is garbage and fails this test.

This test does not make sense if ops->oobbuf is NULL, which it is in the
RAW write path, so include that in the test.

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

No differences found