linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch]joydev open count handling
@ 2007-10-05 15:10 Oliver Neukum
  2007-10-07 18:58 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Neukum @ 2007-10-05 15:10 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input

Hi,

if joydev_open() fails, the open count has to be adjusted.

	Regards
		Oliver

Signed-off-by: Oliver Neukum <oneukum@suse.de>

----

--- a/drivers/input/joydev.c	2007-10-05 17:01:21.000000000 +0200
+++ b/drivers/input/joydev.c	2007-10-05 17:01:39.000000000 +0200
@@ -193,8 +193,10 @@ static int joydev_open(struct inode *ino
 
 	if (!joydev->open++ && joydev->exist) {
 		error = input_open_device(&joydev->handle);
-		if (error)
+		if (error) {
+			joydev->open--;
 			goto err_free_client;
+		}
 	}
 
 	file->private_data = client;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch]joydev open count handling
  2007-10-05 15:10 [patch]joydev open count handling Oliver Neukum
@ 2007-10-07 18:58 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2007-10-07 18:58 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-input

On Friday 05 October 2007, Oliver Neukum wrote:
> Hi,
> 
> if joydev_open() fails, the open count has to be adjusted.
> 

Thank you Oliver. This will need some adjustments to be applied to
my tree, I will take care of that.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-07 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-05 15:10 [patch]joydev open count handling Oliver Neukum
2007-10-07 18:58 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).