qemu/uas-add-missing-return.patch
wanborj d72c1d27b2 Backport upstream bugfix
Signed-off-by: wanborj <wanbo13@huawei.com>
2022-09-30 17:51:42 +08:00

36 lines
1.1 KiB
Diff

From da75066823387c4f24b55e21ee6c856ffa537174 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Fri, 10 Dec 2021 09:06:59 +0100
Subject: [PATCH 2/6] uas: add missing return
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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>
Signed-off-by: wanbo <wanbo13@huawei.com>
---
hw/usb/dev-uas.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.27.0