diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-06-18 05:06:30 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-07-18 09:55:55 -0400 |
commit | 94784d916458d51043ba76849b9beaf330baef2f (patch) | |
tree | a7b71f0aa61ce5524dc602716c6ae722ff78d461 /drivers/mtd/ubi/vtbl.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/vtbl.c')
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 800ce940a820..1f48c76cf6fe 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -96,9 +96,6 @@ int ubi_change_vtbl_record(struct ubi_device *ubi, int idx, | |||
96 | vtbl_rec->crc = cpu_to_be32(crc); | 96 | vtbl_rec->crc = cpu_to_be32(crc); |
97 | } | 97 | } |
98 | 98 | ||
99 | dbg_msg("change record %d", idx); | ||
100 | ubi_dbg_dump_vtbl_record(vtbl_rec, idx); | ||
101 | |||
102 | mutex_lock(&ubi->vtbl_mutex); | 99 | mutex_lock(&ubi->vtbl_mutex); |
103 | memcpy(&ubi->vtbl[idx], vtbl_rec, sizeof(struct ubi_vtbl_record)); | 100 | memcpy(&ubi->vtbl[idx], vtbl_rec, sizeof(struct ubi_vtbl_record)); |
104 | for (i = 0; i < UBI_LAYOUT_VOLUME_EBS; i++) { | 101 | for (i = 0; i < UBI_LAYOUT_VOLUME_EBS; i++) { |