usb: gadget: udc: Handle gadget_connect failure during bind operation
authorKrishna Kurapati <quic_kriskura@quicinc.com>
Wed, 27 Sep 2023 07:30:27 +0000 (13:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Oct 2023 11:58:11 +0000 (13:58 +0200)
commit0ea39e030a80be2b1b5f98d6b330a8b97dcf3342
treef75cbfa57624471f0edc4085df2fe74631ad6e20
parentef307bc6ef04e8c1ea843231db58e3afaafa9fa6
usb: gadget: udc: Handle gadget_connect failure during bind operation

In the event gadget_connect call (which invokes pullup) fails,
propagate the error to udc bind operation which in turn sends the
error to configfs. The userspace can then retry enumeration if
it chooses to.

Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20230927073027.27952-1-quic_kriskura@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/core.c