]> git.ipfire.org Git - thirdparty/kernel/stable.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, 2 May 2025 05:47:02 +0000 (07:47 +0200)
commita7a27cf25b2bf9a06848eb3e933f9f05763dea53
treecf63695dec054fd99747c113adabab7f69398dfd
parent609c9ea78769d87508d60035eeae9f4e6ed277dc
usb: dwc3: gadget: Refactor loop to avoid NULL endpoints

[ Upstream commit eafba0205426091354f050381c32ad1567c35844 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc3/gadget.c