Fix crash when usb_bulk_read() fails.
This commit is contained in:
parent
6d66866268
commit
4828211e97
1 changed files with 2 additions and 1 deletions
|
@ -77,7 +77,8 @@ int
|
|||
pn53x_usb_bulk_read (struct pn53x_usb_data *data, byte_t abtRx[], const size_t szRx)
|
||||
{
|
||||
int res = usb_bulk_read (data->pudh, data->uiEndPointIn, (char *) abtRx, szRx, USB_TIMEOUT);
|
||||
PRINT_HEX ("RX", abtRx, res);
|
||||
if (res > 0)
|
||||
PRINT_HEX ("RX", abtRx, res);
|
||||
return res;
|
||||
}
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue