summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2014-01-08 19:57:44 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 00:27:42 +0100
commit0631213f3f6ee776db2fb2136778b570d6a17cab (patch)
tree011bacb947019388fb66557f3ca131a59318b863 /drivers
parentmei: use hbm idle state to prevent spurious resets (diff)
downloadlinux-0631213f3f6ee776db2fb2136778b570d6a17cab.tar.xz
linux-0631213f3f6ee776db2fb2136778b570d6a17cab.zip
mei: nfc: mei_nfc_free has to be called under lock
nfc_nfc_free unlink clients from the device list and has to be called under mei mutex Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/mei/nfc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/mei/nfc.c b/drivers/misc/mei/nfc.c
index 0a892205ce7e..54961903bf21 100644
--- a/drivers/misc/mei/nfc.c
+++ b/drivers/misc/mei/nfc.c
@@ -469,7 +469,9 @@ static void mei_nfc_init(struct work_struct *work)
return;
err:
+ mutex_lock(&dev->device_lock);
mei_nfc_free(ndev);
+ mutex_unlock(&dev->device_lock);
return;
}