nfc_initiator_target_is_present() allows pnt==NULL

This commit is contained in:
Philippe Teuwen 2014-01-27 16:07:24 +01:00
parent 7b7f506142
commit d47623319d
2 changed files with 4 additions and 2 deletions

View file

@ -1729,7 +1729,7 @@ int
pn53x_initiator_target_is_present(struct nfc_device *pnd, const nfc_target *pnt)
{
// Check if the argument target nt is equals to current saved target
if (!pn53x_current_target_is(pnd, pnt)) {
if ((pnt != NULL) && (!pn53x_current_target_is(pnd, pnt))) {
return NFC_ETGRELEASED;
}