Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195412
b: refs/heads/master
c: 1170656
h: refs/heads/master
v: v3
  • Loading branch information
Alessio Igor Bogani authored and Greg Kroah-Hartman committed May 20, 2010
1 parent 2c883f0 commit b377043
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31436a1a64b8eed834fba5d570038dd676e04842
refs/heads/master: 1170656d94aff5e86e003394134b9c3ecbdaf10a
9 changes: 0 additions & 9 deletions trunk/drivers/usb/misc/sisusbvga/sisusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <linux/spinlock.h>
#include <linux/kref.h>
#include <linux/usb.h>
#include <linux/smp_lock.h>
#include <linux/vmalloc.h>

#include "sisusb.h"
Expand Down Expand Up @@ -2416,28 +2415,23 @@ sisusb_open(struct inode *inode, struct file *file)
struct usb_interface *interface;
int subminor = iminor(inode);

lock_kernel();
if (!(interface = usb_find_interface(&sisusb_driver, subminor))) {
unlock_kernel();
return -ENODEV;
}

if (!(sisusb = usb_get_intfdata(interface))) {
unlock_kernel();
return -ENODEV;
}

mutex_lock(&sisusb->lock);

if (!sisusb->present || !sisusb->ready) {
mutex_unlock(&sisusb->lock);
unlock_kernel();
return -ENODEV;
}

if (sisusb->isopen) {
mutex_unlock(&sisusb->lock);
unlock_kernel();
return -EBUSY;
}

Expand All @@ -2446,13 +2440,11 @@ sisusb_open(struct inode *inode, struct file *file)
if (sisusb_init_gfxdevice(sisusb, 0)) {
mutex_unlock(&sisusb->lock);
dev_err(&sisusb->sisusb_dev->dev, "Failed to initialize device\n");
unlock_kernel();
return -EIO;
}
} else {
mutex_unlock(&sisusb->lock);
dev_err(&sisusb->sisusb_dev->dev, "Device not attached to USB 2.0 hub\n");
unlock_kernel();
return -EIO;
}
}
Expand All @@ -2465,7 +2457,6 @@ sisusb_open(struct inode *inode, struct file *file)
file->private_data = sisusb;

mutex_unlock(&sisusb->lock);
unlock_kernel();

return 0;
}
Expand Down

0 comments on commit b377043

Please sign in to comment.