Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a52c8afd authored by David Woodhouse's avatar David Woodhouse
Browse files

Merge branch 'master' of git://git.infradead.org/ubi-2.6

parents faa5c2a1 762a9f29
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -104,12 +104,9 @@ static int vol_cdev_open(struct inode *inode, struct file *file)
	struct ubi_volume_desc *desc;
	int vol_id = iminor(inode) - 1, mode, ubi_num;

	lock_kernel();
	ubi_num = ubi_major2num(imajor(inode));
	if (ubi_num < 0) {
		unlock_kernel();
	if (ubi_num < 0)
		return ubi_num;
	}

	if (file->f_mode & FMODE_WRITE)
		mode = UBI_READWRITE;
@@ -119,7 +116,6 @@ static int vol_cdev_open(struct inode *inode, struct file *file)
	dbg_gen("open volume %d, mode %d", vol_id, mode);

	desc = ubi_open_volume(ubi_num, vol_id, mode);
	unlock_kernel();
	if (IS_ERR(desc))
		return PTR_ERR(desc);

+1 −1
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
		pnum, vol_id, lnum, ec, sqnum, bitflips);

	sv = add_volume(si, vol_id, pnum, vid_hdr);
	if (IS_ERR(sv) < 0)
	if (IS_ERR(sv))
		return PTR_ERR(sv);

	if (si->max_sqnum < sqnum)
+2 −2
Original line number Diff line number Diff line
@@ -244,8 +244,8 @@ static int vtbl_check(const struct ubi_device *ubi,
		}

		if (reserved_pebs > ubi->good_peb_count) {
			dbg_err("too large reserved_pebs, good PEBs %d",
				ubi->good_peb_count);
			dbg_err("too large reserved_pebs %d, good PEBs %d",
				reserved_pebs, ubi->good_peb_count);
			err = 9;
			goto bad;
		}