Merge tag 'fixes-for-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

USB: fixes for v5.10-rc2

Nothing major as of yet, we're adding support for Intel Alder Lake-S
in dwc3, together with a few fixes that are quite important (memory
leak in raw-gadget, probe crashes in goku_udc, and so on).

Signed-off-by: Felipe Balbi <balbi@kernel.org>

* tag 'fixes-for-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
usb: raw-gadget: fix memory leak in gadget_setup
usb: dwc2: Avoid leaving the error_debugfs label unused
usb: dwc3: ep0: Fix delay status handling
usb: gadget: fsl: fix null pointer checking
usb: gadget: goku_udc: fix potential crashes in probe
usb: dwc3: pci: add support for the Intel Alder Lake-S

+15 -4
+3
drivers/usb/dwc2/platform.c
··· 608 608 #endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */ 609 609 return 0; 610 610 611 + #if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \ 612 + IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) 611 613 error_debugfs: 612 614 dwc2_debugfs_exit(hsotg); 613 615 if (hsotg->hcd_enabled) 614 616 dwc2_hcd_remove(hsotg); 617 + #endif 615 618 error_drd: 616 619 dwc2_drd_exit(hsotg); 617 620
+4
drivers/usb/dwc3/dwc3-pci.c
··· 40 40 #define PCI_DEVICE_ID_INTEL_TGPLP 0xa0ee 41 41 #define PCI_DEVICE_ID_INTEL_TGPH 0x43ee 42 42 #define PCI_DEVICE_ID_INTEL_JSP 0x4dee 43 + #define PCI_DEVICE_ID_INTEL_ADLS 0x7ae1 43 44 44 45 #define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511" 45 46 #define PCI_INTEL_BXT_FUNC_PMU_PWR 4 ··· 366 365 (kernel_ulong_t) &dwc3_pci_intel_properties, }, 367 366 368 367 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_JSP), 368 + (kernel_ulong_t) &dwc3_pci_intel_properties, }, 369 + 370 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ADLS), 369 371 (kernel_ulong_t) &dwc3_pci_intel_properties, }, 370 372 371 373 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_NL_USB),
+2 -1
drivers/usb/dwc3/ep0.c
··· 1058 1058 { 1059 1059 unsigned int direction = !dwc->ep0_expect_in; 1060 1060 1061 + dwc->delayed_status = false; 1062 + 1061 1063 if (dwc->ep0state != EP0_STATUS_PHASE) 1062 1064 return; 1063 1065 1064 - dwc->delayed_status = false; 1065 1066 __dwc3_ep0_do_control_status(dwc, dwc->eps[direction]); 1066 1067 } 1067 1068
+4 -1
drivers/usb/gadget/legacy/raw_gadget.c
··· 564 564 return -ENODEV; 565 565 } 566 566 length = min(arg.length, event->length); 567 - if (copy_to_user((void __user *)value, event, sizeof(*event) + length)) 567 + if (copy_to_user((void __user *)value, event, sizeof(*event) + length)) { 568 + kfree(event); 568 569 return -EFAULT; 570 + } 569 571 572 + kfree(event); 570 573 return 0; 571 574 } 572 575
+1 -1
drivers/usb/gadget/udc/fsl_udc_core.c
··· 1051 1051 u32 bitmask; 1052 1052 struct ep_queue_head *qh; 1053 1053 1054 - if (!_ep || _ep->desc || !(_ep->desc->bEndpointAddress&0xF)) 1054 + if (!_ep || !_ep->desc || !(_ep->desc->bEndpointAddress&0xF)) 1055 1055 return -ENODEV; 1056 1056 1057 1057 ep = container_of(_ep, struct fsl_ep, ep);
+1 -1
drivers/usb/gadget/udc/goku_udc.c
··· 1760 1760 goto err; 1761 1761 } 1762 1762 1763 + pci_set_drvdata(pdev, dev); 1763 1764 spin_lock_init(&dev->lock); 1764 1765 dev->pdev = pdev; 1765 1766 dev->gadget.ops = &goku_ops; ··· 1794 1793 } 1795 1794 dev->regs = (struct goku_udc_regs __iomem *) base; 1796 1795 1797 - pci_set_drvdata(pdev, dev); 1798 1796 INFO(dev, "%s\n", driver_desc); 1799 1797 INFO(dev, "version: " DRIVER_VERSION " %s\n", dmastr()); 1800 1798 INFO(dev, "irq %d, pci mem %p\n", pdev->irq, base);