All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Chris Hudson <chudson@kionix.com>
Cc: Dmitry Torokhov <dtor@mail.ru>, linux-input@vger.kernel.org
Subject: [patch 2/2] Input: kxtj9: fix locking typo in kxtj9_set_poll()
Date: Wed, 20 Jul 2011 08:31:08 +0300	[thread overview]
Message-ID: <20110720053108.GE6445@shale.localdomain> (raw)

According to the comments we want to call mutex_lock() here instead
of mutex_unlock().  That makes more sense.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c
index 6c96dc3..c456f63 100644
--- a/drivers/input/misc/kxtj9.c
+++ b/drivers/input/misc/kxtj9.c
@@ -362,7 +362,7 @@ static ssize_t kxtj9_set_poll(struct device *dev, struct device_attribute *attr,
 		return error;
 
 	/* Lock the device to prevent races with open/close (and itself) */
-	mutex_unlock(&input_dev->mutex);
+	mutex_lock(&input_dev->mutex);
 
 	disable_irq(client->irq);
 

             reply	other threads:[~2011-07-20  5:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20  5:31 Dan Carpenter [this message]
2011-07-20  6:19 ` [patch 2/2] Input: kxtj9: fix locking typo in kxtj9_set_poll() 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=20110720053108.GE6445@shale.localdomain \
    --to=error27@gmail.com \
    --cc=chudson@kionix.com \
    --cc=dtor@mail.ru \
    --cc=linux-input@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.