aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/eba.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/eba.c')
-rw-r--r--drivers/mtd/ubi/eba.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 7c05c6e1abc7..1f951e39c535 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -341,9 +341,6 @@ int ubi_eba_unmap_leb(struct ubi_device *ubi, struct ubi_volume *vol,
341{ 341{
342 int err, pnum, vol_id = vol->vol_id; 342 int err, pnum, vol_id = vol->vol_id;
343 343
344 ubi_assert(ubi->ref_count > 0);
345 ubi_assert(vol->ref_count > 0);
346
347 if (ubi->ro_mode) 344 if (ubi->ro_mode)
348 return -EROFS; 345 return -EROFS;
349 346
@@ -392,9 +389,6 @@ int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
392 struct ubi_vid_hdr *vid_hdr; 389 struct ubi_vid_hdr *vid_hdr;
393 uint32_t uninitialized_var(crc); 390 uint32_t uninitialized_var(crc);
394 391
395 ubi_assert(ubi->ref_count > 0);
396 ubi_assert(vol->ref_count > 0);
397
398 err = leb_read_lock(ubi, vol_id, lnum); 392 err = leb_read_lock(ubi, vol_id, lnum);
399 if (err) 393 if (err)
400 return err; 394 return err;
@@ -618,9 +612,6 @@ int ubi_eba_write_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
618 int err, pnum, tries = 0, vol_id = vol->vol_id; 612 int err, pnum, tries = 0, vol_id = vol->vol_id;
619 struct ubi_vid_hdr *vid_hdr; 613 struct ubi_vid_hdr *vid_hdr;
620 614
621 ubi_assert(ubi->ref_count > 0);
622 ubi_assert(vol->ref_count > 0);
623
624 if (ubi->ro_mode) 615 if (ubi->ro_mode)
625 return -EROFS; 616 return -EROFS;
626 617
@@ -754,9 +745,6 @@ int ubi_eba_write_leb_st(struct ubi_device *ubi, struct ubi_volume *vol,
754 struct ubi_vid_hdr *vid_hdr; 745 struct ubi_vid_hdr *vid_hdr;
755 uint32_t crc; 746 uint32_t crc;
756 747
757 ubi_assert(ubi->ref_count > 0);
758 ubi_assert(vol->ref_count > 0);
759
760 if (ubi->ro_mode) 748 if (ubi->ro_mode)
761 return -EROFS; 749 return -EROFS;
762 750
@@ -871,9 +859,6 @@ int ubi_eba_atomic_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
871 struct ubi_vid_hdr *vid_hdr; 859 struct ubi_vid_hdr *vid_hdr;
872 uint32_t crc; 860 uint32_t crc;
873 861
874 ubi_assert(ubi->ref_count > 0);
875 ubi_assert(vol->ref_count > 0);
876
877 if (ubi->ro_mode) 862 if (ubi->ro_mode)
878 return -EROFS; 863 return -EROFS;
879 864