Move usb_reset(3) call.
As the documentation states, and as reported in isssue 81 (fixed in r421), usb_reset()'s argument is invalid after the call and so usb_close(3) must be called before usb_reset(3).
This commit is contained in:
parent
f7e8ec0a95
commit
f01b73ab32
1 changed files with 1 additions and 1 deletions
|
@ -232,9 +232,9 @@ void pn53x_usb_disconnect(nfc_device_t* pnd)
|
|||
if((ret = usb_release_interface(pus->pudh,0)) < 0)
|
||||
DBG("usb_release failed %i",ret);
|
||||
DBG("%s","resetting USB");
|
||||
usb_reset(pus->pudh);
|
||||
if((ret = usb_close(pus->pudh)) < 0)
|
||||
DBG("usb_close failed %i",ret);
|
||||
usb_reset(pus->pudh);
|
||||
free(pnd->nds);
|
||||
free(pnd);
|
||||
DBG("%s","done!");
|
||||
|
|
Loading…
Reference in a new issue