Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204394
b: refs/heads/master
c: dfe5c7b
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and Jiri Kosina committed Jun 2, 2010
1 parent 97c4510 commit c0fa3c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 33ccbc320fc38094128c68b2ee0b305884965bd4
refs/heads/master: dfe5c7b7e710d8ed885068b0fcfa6f66ab685592
9 changes: 6 additions & 3 deletions trunk/drivers/hid/hid-roccat.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static int roccat_open(struct inode *inode, struct file *file)
printk(KERN_EMERG "roccat device with minor %d doesn't exist\n",
minor);
error = -ENODEV;
goto exit_unlock;
goto exit_err;
}

if (!device->open++) {
Expand All @@ -178,7 +178,7 @@ static int roccat_open(struct inode *inode, struct file *file)
PM_HINT_FULLON);
if (error < 0) {
--device->open;
goto exit_unlock;
goto exit_err;
}
}
error = device->hid->ll_driver->open(device->hid);
Expand All @@ -187,7 +187,7 @@ static int roccat_open(struct inode *inode, struct file *file)
device->hid->ll_driver->power(device->hid,
PM_HINT_NORMAL);
--device->open;
goto exit_unlock;
goto exit_err;
}
}

Expand All @@ -202,6 +202,9 @@ static int roccat_open(struct inode *inode, struct file *file)
mutex_unlock(&device->readers_lock);
mutex_unlock(&devices_lock);
return error;
exit_err:
kfree(reader);
goto exit_unlock;
}

static int roccat_release(struct inode *inode, struct file *file)
Expand Down

0 comments on commit c0fa3c2

Please sign in to comment.