/* Return: Pointer to the newly allocated QH, or NULL on error  */
static struct dwc2_qh* dwc2_hcd_qh_create(struct dwc2_hsotg *hsotg, struct dwc2_hcd_urb *urb, gfp_t mem_flags)
/* Return: Pointer to the newly allocated QH, or NULL on error  */
static struct dwc2_qh* dwc2_hcd_qh_create(struct dwc2_hsotg *hsotg, struct dwc2_hcd_urb *urb, gfp_t mem_flags)
{
	struct dwc2_qh *qh;
	if (!urb->priv)
		return NULL;
	qh = kzalloc(sizeof(*qh), mem_flags);
	if (!qh)
		return NULL;
	dwc2_qh_init(hsotg, qh, urb);
	if (hsotg->core_params->dma_desc_enable > 0 &&
	    dwc2_hcd_qh_init_ddma(hsotg, qh, mem_flags) < 0) {
		dwc2_hcd_qh_free(hsotg, qh);
		return NULL;
	}
	return qh;
}