From: Gerd Hoffmann Date: Fri, 10 Dec 2021 08:06:59 +0000 (+0100) Subject: uas: add missing return X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1c6c0b9ec1c0d980d4f0ac2604c4f9fd9611034b;p=qemu.git uas: add missing return Otherwise we run the error handling code even for successful requests. Fixes: 13b250b12ad3 ("uas: add stream number sanity checks.") Reported-by: Guenter Roeck Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211210080659.2537084-1-kraxel@redhat.com> --- diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 599d6b52a0..c9f295e7e4 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -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);