diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2014-09-23 14:25:47 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-09-23 18:28:23 -0400 |
commit | b9e3016a5369839bf923c8d2bec9d1552e50f3f3 (patch) | |
tree | dc37613321cabcd4e7c212900d6fe597e8d63b01 /drivers/nfc | |
parent | 55ef2e75ccf0d91f7b2f4251dc3b9e56df840928 (diff) |
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.c | 5 |
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) | |||
920 | TRF7970A_SPECIAL_FCN_REG1, | 920 | TRF7970A_SPECIAL_FCN_REG1, |
921 | TRF7970A_SPECIAL_FCN_REG1_14_ANTICOLL); | 921 | TRF7970A_SPECIAL_FCN_REG1_14_ANTICOLL); |
922 | if (ret) | 922 | if (ret) |
923 | return ret; | 923 | goto err_unlock_exit; |
924 | 924 | ||
925 | trf->special_fcn_reg1 = | 925 | trf->special_fcn_reg1 = |
926 | TRF7970A_SPECIAL_FCN_REG1_14_ANTICOLL; | 926 | TRF7970A_SPECIAL_FCN_REG1_14_ANTICOLL; |
@@ -933,7 +933,7 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id) | |||
933 | ret = trf7970a_write(trf, TRF7970A_ISO_CTRL, | 933 | ret = trf7970a_write(trf, TRF7970A_ISO_CTRL, |
934 | iso_ctrl); | 934 | iso_ctrl); |
935 | if (ret) | 935 | if (ret) |
936 | return ret; | 936 | goto err_unlock_exit; |
937 | 937 | ||
938 | trf->iso_ctrl = iso_ctrl; | 938 | trf->iso_ctrl = iso_ctrl; |
939 | } | 939 | } |
@@ -975,6 +975,7 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id) | |||
975 | __func__, trf->state); | 975 | __func__, trf->state); |
976 | } | 976 | } |
977 | 977 | ||
978 | err_unlock_exit: | ||
978 | mutex_unlock(&trf->lock); | 979 | mutex_unlock(&trf->lock); |
979 | return IRQ_HANDLED; | 980 | return IRQ_HANDLED; |
980 | } | 981 | } |