OSDN Git Service

uas: add missing return
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 10 Dec 2021 08:06:59 +0000 (09:06 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 13 Jan 2022 09:58:05 +0000 (10:58 +0100)
Otherwise we run the error handling code even for successful requests.

Fixes: 13b250b12ad3 ("uas: add stream number sanity checks.")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211210080659.2537084-1-kraxel@redhat.com>

hw/usb/dev-uas.c

index 599d6b5..c9f295e 100644 (file)
@@ -908,6 +908,7 @@ static void usb_uas_handle_data(USBDevice *dev, USBPacket *p)
         p->status = USB_RET_STALL;
         break;
     }
+    return;
 
 err_stream:
     error_report("%s: invalid stream %d", __func__, p->stream);