Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69382
b: refs/heads/master
c: 0644501
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Neukum authored and Dmitry Torokhov committed Oct 12, 2007
1 parent c6e6c53 commit d4efd40
Show file tree
Hide file tree
Showing 5 changed files with 17 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: 1ea3abf7fbc39b3b543d7438159ba07b6411561c
refs/heads/master: 064450140f1eab959bd0eca0245f449993216074
5 changes: 4 additions & 1 deletion trunk/drivers/input/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,11 @@ static int evdev_open_device(struct evdev *evdev)

if (!evdev->exist)
retval = -ENODEV;
else if (!evdev->open++)
else if (!evdev->open++) {
retval = input_open_device(&evdev->handle);
if (retval)
evdev->open--;
}

mutex_unlock(&evdev->mutex);
return retval;
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/input/joydev.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ static int joydev_open_device(struct joydev *joydev)

if (!joydev->exist)
retval = -ENODEV;
else if (!joydev->open++)
else if (!joydev->open++) {
retval = input_open_device(&joydev->handle);
if (retval)
joydev->open--;
}

mutex_unlock(&joydev->mutex);
return retval;
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/input/mousedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,11 @@ static int mousedev_open_device(struct mousedev *mousedev)
mixdev_open_devices();
else if (!mousedev->exist)
retval = -ENODEV;
else if (!mousedev->open++)
else if (!mousedev->open++) {
retval = input_open_device(&mousedev->handle);
if (retval)
mousedev->open--;
}

mutex_unlock(&mousedev->mutex);
return retval;
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/input/tsdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,11 @@ static int tsdev_open_device(struct tsdev *tsdev)

if (!tsdev->exist)
retval = -ENODEV;
else if (!tsdev->open++)
else if (!tsdev->open++) {
retval = input_open_device(&tsdev->handle);
if (retval)
tsdev->open--;
}

mutex_unlock(&tsdev->mutex);
return retval;
Expand Down

0 comments on commit d4efd40

Please sign in to comment.