Skip to content

Commit

Permalink
Merge branch 'master' of git://git.infradead.org/ubi-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Oct 18, 2008
2 parents faa5c2a + 762a9f2 commit a52c8af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions drivers/mtd/ubi/cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/ubi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions drivers/mtd/ubi/vtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a52c8af

Please sign in to comment.