From 81e1dd715d1d32c624abfd0deec372bcac086a6b Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 31 Jan 2014 23:19:04 +0100 Subject: [PATCH] nfc_initiator_target_is_present(): Fix error type in case no target is selected yet --- libnfc/chips/pn53x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index df0aec1..d0e888f 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -1893,7 +1893,7 @@ pn53x_initiator_target_is_present(struct nfc_device *pnd, const nfc_target *pnt) // only if pnt is provided but it's not intuitive that // nfc_initiator_select_passive_target(pnt=NULL) + target_is_present(pnt=NULL) fails // Maybe we should have an internal copy of nt, no matter if a pnt was provided - return pnd->last_error = NFC_ETGRELEASED; + return pnd->last_error = NFC_EINVARG; } // Check if the argument target nt is equals to current saved target