Hi,

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

        Regards
                Oliver

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>

----

--- 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;

Reply via email to