Commit fc0ae243 authored by Mark A. Greer's avatar Mark A. Greer Committed by Samuel Ortiz

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: default avatarMark A. Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent b9e3016a
...@@ -1728,22 +1728,22 @@ static int _trf7970a_tg_listen(struct nfc_digital_dev *ddev, u16 timeout, ...@@ -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_C424 |
TRF7970A_RX_SPECIAL_SETTINGS_C212); TRF7970A_RX_SPECIAL_SETTINGS_C212);
if (ret) if (ret)
return ret; goto out_err;
ret = trf7970a_write(trf, TRF7970A_REG_IO_CTRL, ret = trf7970a_write(trf, TRF7970A_REG_IO_CTRL,
TRF7970A_REG_IO_CTRL_VRS(0x1)); TRF7970A_REG_IO_CTRL_VRS(0x1));
if (ret) if (ret)
return ret; goto out_err;
ret = trf7970a_write(trf, TRF7970A_NFC_LOW_FIELD_LEVEL, ret = trf7970a_write(trf, TRF7970A_NFC_LOW_FIELD_LEVEL,
TRF7970A_NFC_LOW_FIELD_LEVEL_RFDET(0x3)); TRF7970A_NFC_LOW_FIELD_LEVEL_RFDET(0x3));
if (ret) if (ret)
return ret; goto out_err;
ret = trf7970a_write(trf, TRF7970A_NFC_TARGET_LEVEL, ret = trf7970a_write(trf, TRF7970A_NFC_TARGET_LEVEL,
TRF7970A_NFC_TARGET_LEVEL_RFDET(0x7)); TRF7970A_NFC_TARGET_LEVEL_RFDET(0x7));
if (ret) if (ret)
return ret; goto out_err;
trf->ddev = ddev; trf->ddev = ddev;
trf->cb = cb; trf->cb = cb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment