diff options
author | Badhri Jagan Sridharan <badhri@google.com> | 2023-04-07 05:07:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-20 11:16:33 +0200 |
commit | a3afbf5cc887fc3401f012fe629810998ed61859 (patch) | |
tree | c50e2a63b49f2bb93fbf97d6a5273016a1a8483a /ipc | |
parent | usb: gadget: udc: core: Invoke usb_gadget_connect only when started (diff) | |
download | linux-a3afbf5cc887fc3401f012fe629810998ed61859.tar.xz linux-a3afbf5cc887fc3401f012fe629810998ed61859.zip |
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.
Fixes: 5a1da544e572 ("usb: gadget: core: do not try to disconnect gadget if it is not connected")
Cc: stable@vger.kernel.org
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>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions