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.
This commit is contained in:
Romuald Conty 2013-02-15 09:38:26 +01:00
parent 3584338d85
commit 360365ca84

View file

@ -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: