FROMGIT: usb: gadget: udc: core: Prevent redundant calls to pullup
usb_gadget_connect calls gadget->ops->pullup without checking whether gadget->connected was previously set. Make this symmetric to usb_gadget_disconnect by returning early if gadget->connected is already set. Bug: 276227797 Bug: 280618182 Fixes: 5a1da544 ("usb: gadget: core: do not try to disconnect gadget if it is not connected") Cc: stable@vger.kernel.org Change-Id: I60b23114c0df7b282bcb1ce638683960305992c5 Signed-off-by:Badhri Jagan Sridharan <badhri@google.com> Link: https://lore.kernel.org/r/20230407030741.3163220-2-badhri@google.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit a3afbf5c https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next) (cherry picked from commit d2b52cbb)
Loading
Please sign in to comment