pn53x: only create a current target when at least one have been found.
This commit is contained in:
parent
07dfed8a08
commit
936210c076
@ -1271,10 +1271,11 @@ pn53x_initiator_select_dep_target(struct nfc_device *pnd,
|
|||||||
} else {
|
} else {
|
||||||
res = pn53x_InJumpForDEP(pnd, ndm, nbr, pbtPassiveInitiatorData, NULL, NULL, 0, pnt, timeout);
|
res = pn53x_InJumpForDEP(pnd, ndm, nbr, pbtPassiveInitiatorData, NULL, NULL, 0, pnt, timeout);
|
||||||
}
|
}
|
||||||
if (res >= 0)
|
if (res > 0) {
|
||||||
if (pn53x_current_target_new(pnd, pnt) == NULL) {
|
if (pn53x_current_target_new(pnd, pnt) == NULL) {
|
||||||
return NFC_ESOFT;
|
return NFC_ESOFT;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user