diff options
Diffstat (limited to 'drivers/mtd/ubi/vtbl.c')
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 23c5376234b2..10c22257f601 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -461,7 +461,8 @@ static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi, | |||
461 | if (!leb_corrupted[0]) { | 461 | if (!leb_corrupted[0]) { |
462 | /* LEB 0 is OK */ | 462 | /* LEB 0 is OK */ |
463 | if (leb[1]) | 463 | if (leb[1]) |
464 | leb_corrupted[1] = memcmp(leb[0], leb[1], ubi->vtbl_size); | 464 | leb_corrupted[1] = memcmp(leb[0], leb[1], |
465 | ubi->vtbl_size); | ||
465 | if (leb_corrupted[1]) { | 466 | if (leb_corrupted[1]) { |
466 | ubi_warn("volume table copy #2 is corrupted"); | 467 | ubi_warn("volume table copy #2 is corrupted"); |
467 | err = create_vtbl(ubi, si, 1, leb[0]); | 468 | err = create_vtbl(ubi, si, 1, leb[0]); |
@@ -859,11 +860,10 @@ int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_scan_info *si) | |||
859 | 860 | ||
860 | out_free: | 861 | out_free: |
861 | vfree(ubi->vtbl); | 862 | vfree(ubi->vtbl); |
862 | for (i = 0; i < ubi->vtbl_slots + UBI_INT_VOL_COUNT; i++) | 863 | for (i = 0; i < ubi->vtbl_slots + UBI_INT_VOL_COUNT; i++) { |
863 | if (ubi->volumes[i]) { | 864 | kfree(ubi->volumes[i]); |
864 | kfree(ubi->volumes[i]); | 865 | ubi->volumes[i] = NULL; |
865 | ubi->volumes[i] = NULL; | 866 | } |
866 | } | ||
867 | return err; | 867 | return err; |
868 | } | 868 | } |
869 | 869 | ||