Hi, OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> writes: > diff -puN drivers/usb/host/xhci-ring.c~xhci-fix-abort-race2 drivers/usb/host/xhci-ring.c > --- xhci/drivers/usb/host/xhci-ring.c~xhci-fix-abort-race2 2016-11-16 13:36:07.219329211 +0900 > +++ xhci-hirofumi/drivers/usb/host/xhci-ring.c 2016-11-16 13:36:07.221329211 +0900 > @@ -284,6 +284,61 @@ static bool xhci_mod_cmd_timer(struct xh > return mod_delayed_work(system_wq, &xhci->cmd_timer, delay); > } > > +static struct xhci_command *xhci_next_queued_cmd(struct xhci_hcd *xhci) > +{ > + if (list_empty(&xhci->cmd_list)) > + return NULL; > + return list_first_entry(&xhci->cmd_list, struct xhci_command, cmd_list); could use list_first_entry_or_null() here -- balbi
Attachment:
signature.asc
Description: PGP signature