aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/vmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/vmt.c')
-rw-r--r--drivers/mtd/ubi/vmt.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 177227e1f80d..221ce70be569 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -526,7 +526,6 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs)
526 } 526 }
527 spin_unlock(&ubi->volumes_lock); 527 spin_unlock(&ubi->volumes_lock);
528 528
529
530 /* Reserve physical eraseblocks */ 529 /* Reserve physical eraseblocks */
531 pebs = reserved_pebs - vol->reserved_pebs; 530 pebs = reserved_pebs - vol->reserved_pebs;
532 if (pebs > 0) { 531 if (pebs > 0) {
@@ -746,11 +745,6 @@ static void paranoid_check_volume(struct ubi_device *ubi, int vol_id)
746 goto fail; 745 goto fail;
747 } 746 }
748 747
749 if (vol->upd_marker != 0 && vol->upd_marker != 1) {
750 ubi_err("bad upd_marker");
751 goto fail;
752 }
753
754 if (vol->upd_marker && vol->corrupted) { 748 if (vol->upd_marker && vol->corrupted) {
755 dbg_err("update marker and corrupted simultaneously"); 749 dbg_err("update marker and corrupted simultaneously");
756 goto fail; 750 goto fail;
@@ -785,7 +779,7 @@ static void paranoid_check_volume(struct ubi_device *ubi, int vol_id)
785 779
786 n = (long long)vol->used_ebs * vol->usable_leb_size; 780 n = (long long)vol->used_ebs * vol->usable_leb_size;
787 if (vol->vol_type == UBI_DYNAMIC_VOLUME) { 781 if (vol->vol_type == UBI_DYNAMIC_VOLUME) {
788 if (vol->corrupted != 0) { 782 if (vol->corrupted) {
789 ubi_err("corrupted dynamic volume"); 783 ubi_err("corrupted dynamic volume");
790 goto fail; 784 goto fail;
791 } 785 }
@@ -802,10 +796,6 @@ static void paranoid_check_volume(struct ubi_device *ubi, int vol_id)
802 goto fail; 796 goto fail;
803 } 797 }
804 } else { 798 } else {
805 if (vol->corrupted != 0 && vol->corrupted != 1) {
806 ubi_err("bad corrupted");
807 goto fail;
808 }
809 if (vol->used_ebs < 0 || vol->used_ebs > vol->reserved_pebs) { 799 if (vol->used_ebs < 0 || vol->used_ebs > vol->reserved_pebs) {
810 ubi_err("bad used_ebs"); 800 ubi_err("bad used_ebs");
811 goto fail; 801 goto fail;