Commit 936210c0 authored by Romuald Conty's avatar Romuald Conty

pn53x: only create a current target when at least one have been found.

parent 07dfed8a
......@@ -1271,10 +1271,11 @@ pn53x_initiator_select_dep_target(struct nfc_device *pnd,
} else {
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) {
return NFC_ESOFT;
}
}
return res;
}
......
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