]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/usb/gadget/dummy_hcd.c
USB: centralize -EREMOTEIO handling
[mirror_ubuntu-jammy-kernel.git] / drivers / usb / gadget / dummy_hcd.c
index c441d10c087ef767b6d90e6b5937f99e1eea1de6..0cb032526ca2f5318979df79f28c48780341192e 100644 (file)
@@ -1099,8 +1099,7 @@ top:
                 *
                 * partially filling a buffer optionally blocks queue advances
                 * (so completion handlers can clean up the queue) but we don't
-                * need to emulate such data-in-flight.  so we only show part
-                * of the URB_SHORT_NOT_OK effect: completion status.
+                * need to emulate such data-in-flight.
                 */
                if (is_short) {
                        if (host_len == dev_len) {
@@ -1111,10 +1110,7 @@ top:
                                if (dev_len > host_len)
                                        maybe_set_status (urb, -EOVERFLOW);
                                else
-                                       maybe_set_status (urb,
-                                               (urb->transfer_flags
-                                                       & URB_SHORT_NOT_OK)
-                                               ? -EREMOTEIO : 0);
+                                       maybe_set_status (urb, 0);
                        } else if (!to_host) {
                                maybe_set_status (urb, 0);
                                if (host_len > dev_len)
@@ -1516,7 +1512,6 @@ restart:
                        continue;
 
 return_urb:
-               urb->hcpriv = NULL;
                list_del (&urbp->urbp_list);
                kfree (urbp);
                if (ep)