diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-18 11:47:37 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-18 11:47:37 +0100 |
commit | a52c8afdd035a72da55756d5e7f9fb35cc62dcf5 (patch) | |
tree | 18d6a6e15b971de99dd2264f3ab219523bdd2773 /drivers/mtd/ubi/cdev.c | |
parent | faa5c2a15e14b6a4e59fcae65dec5258e723ea9f (diff) | |
parent | 762a9f291bfdf9e4d5c2b80d730d79055c8d8c99 (diff) |
Merge branch 'master' of git://git.infradead.org/ubi-2.6
Diffstat (limited to 'drivers/mtd/ubi/cdev.c')
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 03c759b4eeb5..b30a0b83d7f1 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c @@ -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); |