]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: dwc3: gadget: Refactor loop to avoid NULL endpoints
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 12 Feb 2025 19:28:02 +0000 (21:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2025 08:29:20 +0000 (09:29 +0100)
commiteafba0205426091354f050381c32ad1567c35844
tree4d3b361a7374a13ef58a74e9766ac252de979286
parent8bc8a32a280410f68eae99e1ec623ac87586cb1f
usb: dwc3: gadget: Refactor loop to avoid NULL endpoints

Prepare the gadget driver to handle the reserved endpoints that will be
not allocated at the initialisation time.

While at it, add a warning where the NULL endpoint should never happen.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <fntoth@gmail.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20250212193116.2487289-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c