The low level init was not setting up temporary buffers. This was causing yaffs_format
to crash in the case of formating a device with inband tags.
Solution is to move the temporary buffer creation into low level init.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
return YAFFS_FAIL;
}
+ if (!yaffs_init_tmp_buffers(dev))
+ return YAFFS_FAIL;
+
if (yaffs_init_nand(dev) != YAFFS_OK) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "InitialiseNAND failed");
return YAFFS_FAIL;
}
+ dev->ll_init = 1;
+
return YAFFS_OK;
}
yaffs_endian_config(dev);
- /* Initialise temporary buffers and caches. */
- if (!yaffs_init_tmp_buffers(dev))
- init_failed = 1;
-
+ /* Initialise temporary caches. */
dev->gc_cleanup_list = NULL;
if (!init_failed)