usb: dwc3: gadget: Fix NULL pointer in dwc3_remove_requests
USB ep's desc field will be marked as NULL if ep is not
enabled. Here in usb_endpoint_xfer_isoc function we are
trying to access desc field for the ep. Since it is
not enabled it leads to NULL pointer dereference. This
happens when any function bind fails. So android_disable
gets called which in turn calls dwc3_gadget_pullup and
eventually dwc3_remove_requests gets called. This
change adds a check before accessing the desc field of
ep.
Change-Id: Ib7cb9418892b3f3e42ec3088b88112abed589fe0
Signed-off-by:
Pratham Pratap <prathampratap@codeaurora.org>
Loading
Please register or sign in to comment