diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-06-18 12:06:30 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-07-18 16:55:55 +0300 |
commit | 94784d916458d51043ba76849b9beaf330baef2f (patch) | |
tree | a7b71f0aa61ce5524dc602716c6ae722ff78d461 /drivers/mtd/ubi/debug.c | |
parent | 7753f1692f53d82b4cc08084462b0fd2803c1f04 (diff) |
UBI: bugfix in error path
When volume creation fails, we have to set ubi->volumes[vol_id]
back to NULL.
This patch also tweaks some debugging stuff.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/debug.c')
-rw-r--r-- | drivers/mtd/ubi/debug.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c index 9a996c5280f9..310341e5cd43 100644 --- a/drivers/mtd/ubi/debug.c +++ b/drivers/mtd/ubi/debug.c @@ -91,7 +91,7 @@ void ubi_dbg_dump_vol_info(const struct ubi_volume *vol) if (vol->name_len <= UBI_VOL_NAME_MAX && strnlen(vol->name, vol->name_len + 1) == vol->name_len) { - dbg_msg("name %s", vol->name); + dbg_msg("name %s", vol->name); } else { dbg_msg("the 1st 5 characters of the name: %c%c%c%c%c", vol->name[0], vol->name[1], vol->name[2], @@ -117,13 +117,13 @@ void ubi_dbg_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx) dbg_msg("name_len %d", name_len); if (r->name[0] == '\0') { - dbg_msg("name NULL"); + dbg_msg("name NULL"); return; } if (name_len <= UBI_VOL_NAME_MAX && strnlen(&r->name[0], name_len + 1) == name_len) { - dbg_msg("name %s", &r->name[0]); + dbg_msg("name %s", &r->name[0]); } else { dbg_msg("1st 5 characters of the name: %c%c%c%c%c", r->name[0], r->name[1], r->name[2], r->name[3], |