qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] uas: add missing return
@ 2021-12-10  8:06 Gerd Hoffmann
  2021-12-10 12:26 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2021-12-10  8:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Guenter Roeck

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>
---
 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 599d6b52a012..c9f295e7e449 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.33.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-10 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-10  8:06 [PATCH] uas: add missing return Gerd Hoffmann
2021-12-10 12:26 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).