summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@animalcreek.com>2014-09-23 11:25:47 -0700
committerSamuel Ortiz <sameo@linux.intel.com>2014-09-24 00:28:23 +0200
commitb9e3016a5369839bf923c8d2bec9d1552e50f3f3 (patch)
treedc37613321cabcd4e7c212900d6fe597e8d63b01 /drivers/nfc
parent55ef2e75ccf0d91f7b2f4251dc3b9e56df840928 (diff)
downloadlinux-b9e3016a5369839bf923c8d2bec9d1552e50f3f3.tar.bz2
NFC: trf7970a: Unlock mutex before exiting trf7970a_irq()
Recent changes to trf7970a_irq() added a couple return paths that don't unlock the mutex that is locked when the routine is entered. Fix this by ensuring the mutex is always unlocked before returning. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/trf7970a.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index 59a7df7f023c..0fe7b957436c 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -920,7 +920,7 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id)
TRF7970A_SPECIAL_FCN_REG1,
TRF7970A_SPECIAL_FCN_REG1_14_ANTICOLL);
if (ret)
- return ret;
+ goto err_unlock_exit;
trf->special_fcn_reg1 =
TRF7970A_SPECIAL_FCN_REG1_14_ANTICOLL;
@@ -933,7 +933,7 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id)
ret = trf7970a_write(trf, TRF7970A_ISO_CTRL,
iso_ctrl);
if (ret)
- return ret;
+ goto err_unlock_exit;
trf->iso_ctrl = iso_ctrl;
}
@@ -975,6 +975,7 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id)
__func__, trf->state);
}
+err_unlock_exit:
mutex_unlock(&trf->lock);
return IRQ_HANDLED;
}