mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-08-16 04:11:24 +03:00
firmware: sniffer: honor the ep argument of usb_msg_alloc_hdr()
Even though all callers pass the same endpoint anyway the arg should be used and not discarded. Change-Id: I1fa0097b9eef531900b359c7293a6c60040254e4
This commit is contained in:
@@ -239,14 +239,14 @@ static void update_wt(uint8_t wi, uint8_t d, const char *cause)
|
|||||||
static struct msgb *usb_msg_alloc_hdr(uint8_t ep, uint8_t msg_class, uint8_t msg_type)
|
static struct msgb *usb_msg_alloc_hdr(uint8_t ep, uint8_t msg_class, uint8_t msg_type)
|
||||||
{
|
{
|
||||||
/* Only allocate message if not too many are already in the queue */
|
/* Only allocate message if not too many are already in the queue */
|
||||||
struct llist_head *head = usb_get_queue(SIMTRACE_USB_EP_CARD_DATAIN);
|
struct llist_head *head = usb_get_queue(ep);
|
||||||
if (!head) {
|
if (!head) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (llist_count(head) > 5) {
|
if (llist_count(head) > 5) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
struct msgb *usb_msg = usb_buf_alloc(SIMTRACE_USB_EP_CARD_DATAIN);
|
struct msgb *usb_msg = usb_buf_alloc(ep);
|
||||||
if (!usb_msg) {
|
if (!usb_msg) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user