mirror of
https://github.com/apache/nuttx.git
synced 2026-08-25 07:27:11 +00:00
arch/sim: Explicitly compare whether transfer is NULL in usbhost
if (!transfer) ==> if (transfer == NULL) Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
This commit is contained in:
parent
2c24420a1c
commit
59f200ac4f
1 changed files with 2 additions and 2 deletions
|
|
@ -292,7 +292,7 @@ static void host_libusb_isotransfer_cb(struct libusb_transfer *transfer)
|
|||
size_t length;
|
||||
int i;
|
||||
|
||||
if (!transfer)
|
||||
if (transfer == NULL)
|
||||
{
|
||||
ERROR("host_libusb_isotransfer_cb() fail: %s\n",
|
||||
host_uninterruptible(libusb_strerror,
|
||||
|
|
@ -498,7 +498,7 @@ host_libusb_isotransfer(struct host_libusb_hostdev_s *dev, uint8_t addr,
|
|||
max_packet_size = datareq->maxpacketsize;
|
||||
num_iso_pack = (datareq->len + max_packet_size - 1) / max_packet_size;
|
||||
transfer = host_uninterruptible(libusb_alloc_transfer, num_iso_pack);
|
||||
if (!transfer)
|
||||
if (transfer == NULL)
|
||||
{
|
||||
ERROR("libusb_alloc_transfer() fail: %s\n",
|
||||
host_uninterruptible(libusb_strerror,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue