linux/drivers/usb/gadget
Uwe Kleine-König d464dac472 usb: gadget: fsl: Initialize udc before using it
fsl_ep_queue() is only called by usb_ep_queue() (as ep->ops->queue()).
So _ep isn't NULL.

As ep->ops->queue = fsl_ep_queue, the ep was initialized by
struct_ep_setup() and so ep->udc isn't NULL either.

Drop the check for _ep being NULL and assign udc earlier to prevent
following an uninitialized pointer in the two dev_vdbg()s in lines 878
and 882. This fixes a compiler warning when using clang and
CONFIG_USB_GADGET_VERBOSE=y.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404050227.TTvcCPBu-lkp@intel.com/
Fixes: 6025f20f16 ("usb: gadget: fsl-udc: Replace custom log wrappers by dev_{err,warn,dbg,vdbg}")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240405055812.694123-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-05 08:08:37 +02:00
..
function usb: gadget: f_ncm: Fix UAF ncm object at re-bind after usb ep transport error 2024-04-04 16:55:53 +02:00
legacy usb: gadget: webcam: Make g_webcam loadable again 2023-12-15 18:27:38 +01:00
udc usb: gadget: fsl: Initialize udc before using it 2024-04-05 08:08:37 +02:00
composite.c usb: gadget: composite: cleanup function config_ep_by_speed_and_alt() 2023-08-22 14:48:33 +02:00
config.c usb: gadget: config: remove max speed check in usb_assign_descriptors() 2023-08-22 14:48:33 +02:00
configfs.c usb: gadget: configfs: Replace snprintf() with the safer scnprintf() variant 2023-12-15 13:55:29 +01:00
configfs.h
epautoconf.c usb: gadget: fix for a typo that conveys logically-inverted information. 2021-09-14 10:27:54 +02:00
functions.c
Kconfig usb: gadget: functionfs: Add DMABUF import interface 2024-02-17 17:00:09 +01:00
Makefile usb: gadget: Makefile: remove ccflags-y 2022-03-18 12:56:08 +01:00
u_f.c
u_f.h
u_os_desc.h
usbstring.c