projects/linux·commit f6a0e2ca

Merge tag 'char-misc-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

f6a0e2ca · Linus Torvalds <[email protected]> · 2013-01-14 09:06:24 -08:00

Pull char/misc fix from Greg Kroah-Hartman:
 "Here is a single fix for the mei driver that resolves a reported
  issue.

  Signed-off-by: Greg Kroah-Hartman <[email protected]>"

* tag 'char-misc-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  mei: fix mismatch in mutex unlock-lock in mei_amthif_read()
Commit
f6a0e2ca7b1fe89da4e4b0afa6ba08dc34f1a0f7
Parents
7f1825da · e6028db0

Merge commit. Changes below are compared with the first parent: 7f1825da.

Changes

1 files changed · +3 −3

FileStatusAddDelContent
drivers/misc/mei/amthif.cmodified+3−3View file

drivers/misc/mei/amthif.c

View file
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index 18794ae..e40ffd9 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -187,13 +187,13 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
wait_ret = wait_event_interruptible(dev->iamthif_cl.wait,
(cb = mei_amthif_find_read_list_entry(dev, file)));
+ /* Locking again the Mutex */
+ mutex_lock(&dev->device_lock);
+
if (wait_ret)
return -ERESTARTSYS;
dev_dbg(&dev->pdev->dev, "woke up from sleep\n");
-
- /* Locking again the Mutex */
- mutex_lock(&dev->device_lock);
}