From: Tomas Winkler Date: Wed, 8 Jan 2014 18:57:44 +0000 (+0200) Subject: mei: nfc: mei_nfc_free has to be called under lock X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0631213f3f6ee776db2fb2136778b570d6a17cab;p=linux-beck.git 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 Reviewed-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman --- 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; }