From 360365ca84a40a770a0386d5693b47b4e3d997dd Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Fri, 15 Feb 2013 09:38:26 +0100 Subject: [PATCH] Preserves error code while setting parameters It now returns a more precise error code while using pn53x_set_property_bool() with NP_AUTO_ISO14443_4 flag. --- libnfc/chips/pn53x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index 92ce658..0d61fdd 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -882,8 +882,7 @@ pn53x_set_property_bool(struct nfc_device *pnd, const nfc_property property, con // Nothing to do return NFC_SUCCESS; pnd->bAutoIso14443_4 = bEnable; - if (pn53x_set_parameters(pnd, PARAM_AUTO_RATS, bEnable) == 0) - return NFC_SUCCESS; + return pn53x_set_parameters(pnd, PARAM_AUTO_RATS, bEnable); break; case NP_FORCE_ISO14443_A: