Skip to contentSkip to conversation

joydev open count handling

PATCH In review Oliver Neukum 2 participants 2 messages Oct 5, 2007 – Oct 7, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 joydev open count handling

Hi,

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

Regards
Oliver

----

drivers/input/joydev.c +3 -1
@@ -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;
maintainer
#1 lore raw
Quoted 4 lines · Oliver Neukum

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.

Signature · 1 line
Dmitry