1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

usbdev_mock: fix possible null pointer dereference

This commit is contained in:
Koen Zandberg 2020-09-11 11:07:15 +02:00
parent 8a2080ab91
commit 3e9081ed01
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -93,8 +93,9 @@ usbdev_ep_t *_new_ep(usbdev_t *dev, usb_ep_type_t type, usb_ep_dir_t dir,
res->ep.dir = dir;
res->ep.type = type;
res->ep.dev = dev;
return &res->ep;
}
return &res->ep;
return NULL;
}
int _get(usbdev_t *usbdev, usbopt_t opt,