[PATCH] usb: uhci-hcd: fix submit_int_msg() return value

Peter Mamonov pmamonov at gmail.com
Wed Mar 22 14:37:36 PDT 2017


Signed-off-by: Peter Mamonov <pmamonov at gmail.com>
---
 drivers/usb/host/uhci-hcd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 04d167ee3..d32140026 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -579,6 +579,7 @@ static int submit_int_msg(struct usb_device *dev,
 	struct uhci_td *mytd;
 	void *_buffer;
 	dma_addr_t buffer_dma;
+	int ret = 0;
 
 	if (interval < 0 || interval >= 256)
 		return -1;
@@ -624,7 +625,7 @@ static int submit_int_msg(struct usb_device *dev,
 
 	usb_dotoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
 
-	handle_usb_interrupt(uhci);
+	ret = handle_usb_interrupt(uhci);
 
 	if (buffer) {
 		memcpy(buffer, _buffer, transfer_len);
@@ -633,7 +634,7 @@ static int submit_int_msg(struct usb_device *dev,
 
 	usb_check_int_chain(uhci);
 
-	return 0;
+	return ret;
 }
 /**********************************************************************
  * Low Level functions
-- 
2.11.0




More information about the barebox mailing list