diff --git a/libnfc/drivers/acr122.c b/libnfc/drivers/acr122.c index ef9c02a..f3f40a9 100644 --- a/libnfc/drivers/acr122.c +++ b/libnfc/drivers/acr122.c @@ -185,9 +185,7 @@ acr122_probe (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * pszDev } acr122_free_scardcontext (); - if (*pszDeviceFound) - return true; - return false; + return true; } nfc_device_t * diff --git a/libnfc/drivers/pn53x_usb.c b/libnfc/drivers/pn53x_usb.c index ee7eb22..b605102 100644 --- a/libnfc/drivers/pn53x_usb.c +++ b/libnfc/drivers/pn53x_usb.c @@ -206,9 +206,8 @@ pn53x_usb_probe (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * psz } } } - if (*pszDeviceFound) - return true; - return false; + + return true; } bool diff --git a/libnfc/nfc.c b/libnfc/nfc.c index d4bb86b..1696a9f 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -191,9 +191,8 @@ nfc_pick_device (void) size_t szN; if (!ndr->probe (pndd, 1, &szN)) { - DBG ("%s probe failed", ndr->name); - free (pndd); - return NULL; + ERR ("%s probe failed", ndr->name); + szN = 0; } if (szN == 0) {