Fix nfc_target_init() timeout return
This patch prevent from returning a successfull error code while timeout occurred. Thanks to blck on forum: http://www.libnfc.org/community/post/4913/#p4913
This commit is contained in:
parent
4817a6e5c9
commit
a7fc1bddaf
1 changed files with 1 additions and 1 deletions
|
@ -1911,7 +1911,7 @@ pn53x_target_init(struct nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const
|
|||
|
||||
if ((res = pn53x_TgInitAsTarget(pnd, ptm, pbtMifareParams, pbtTkt, szTkt, pbtFeliCaParams, pbtNFCID3t, pbtGBt, szGBt, pbtRx, szRxLen, &btActivatedMode, timeout)) < 0) {
|
||||
if (res == NFC_ETIMEOUT) {
|
||||
return pn53x_idle(pnd);
|
||||
pn53x_idle(pnd);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue