diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2014-09-23 22:25:48 +0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-09-24 02:28:23 +0400 |
commit | fc0ae24386142299db14dfea7f32a20022d94d90 (patch) | |
tree | bfa9a5712f931fd34d1a94e687de48a0942aff91 | |
parent | b9e3016a5369839bf923c8d2bec9d1552e50f3f3 (diff) | |
download | linux-fc0ae24386142299db14dfea7f32a20022d94d90.tar.xz |
NFC: trf7970a: Unlock mutex before exiting _trf7970a_tg_listen()
The recently added _trf7970a_tg_listen() routine
has some return paths that don't unlock the mutex
that is locked when the routine is entered. Fix
this by always unlocking the mutex before returning.
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/nfc/trf7970a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c index 0fe7b957436c..d2ccd2890647 100644 --- a/drivers/nfc/trf7970a.c +++ b/drivers/nfc/trf7970a.c @@ -1728,22 +1728,22 @@ static int _trf7970a_tg_listen(struct nfc_digital_dev *ddev, u16 timeout, TRF7970A_RX_SPECIAL_SETTINGS_C424 | TRF7970A_RX_SPECIAL_SETTINGS_C212); if (ret) - return ret; + goto out_err; ret = trf7970a_write(trf, TRF7970A_REG_IO_CTRL, TRF7970A_REG_IO_CTRL_VRS(0x1)); if (ret) - return ret; + goto out_err; ret = trf7970a_write(trf, TRF7970A_NFC_LOW_FIELD_LEVEL, TRF7970A_NFC_LOW_FIELD_LEVEL_RFDET(0x3)); if (ret) - return ret; + goto out_err; ret = trf7970a_write(trf, TRF7970A_NFC_TARGET_LEVEL, TRF7970A_NFC_TARGET_LEVEL_RFDET(0x7)); if (ret) - return ret; + goto out_err; trf->ddev = ddev; trf->cb = cb; |