linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@atrey.karlin.mff.cuni.cz
Subject: [patch]joydev open count handling
Date: Fri, 5 Oct 2007 17:10:21 +0200	[thread overview]
Message-ID: <200710051710.21518.oliver@neukum.org> (raw)

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;

             reply	other threads:[~2007-10-05 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 15:10 Oliver Neukum [this message]
2007-10-07 18:58 ` [patch]joydev open count handling Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200710051710.21518.oliver@neukum.org \
    --to=oliver@neukum.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).