Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48742
b: refs/heads/master
c: 5b06470
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Feb 16, 2007
1 parent 26bd065 commit e9cd814
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 57e4f041bfffa191a318dab44eb991d79a6a9d5c
refs/heads/master: 5b06470816fb5e658e81db2a55b530ff2ba711c9
10 changes: 6 additions & 4 deletions trunk/drivers/usb/usb-skeleton.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ static int skel_open(struct inode *inode, struct file *file)
goto exit;
}

/* increment our usage count for the device */
kref_get(&dev->kref);

/* prevent the device from being autosuspended */
retval = usb_autopm_get_interface(interface);
if (retval)
if (retval) {
kref_put(&dev->kref, skel_delete);
goto exit;

/* increment our usage count for the device */
kref_get(&dev->kref);
}

/* save our object in the file's private structure */
file->private_data = dev;
Expand Down

0 comments on commit e9cd814

Please sign in to comment.