USB/host: Bugfix: Return length of copied buffer in uhci_hub_control()
authorDeng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Sun, 6 Oct 2013 06:08:17 +0000 (23:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2013 07:07:17 +0000 (00:07 -0700)
commit5a3e2055c56c7c32b51d47bde78c7f7508ffea98
tree5bf3a633e6d37f2aa694277276442b6dc604201e
parentcae9160d9b074a75c5ae4b08a8552155b1607b9b
USB/host: Bugfix: Return length of copied buffer in uhci_hub_control()

In addition to the error statuses -ETIMEDOUT and -EPIPE, uhci_hub_control()
needs to return the length of copied buffer when appropriate, so that the
returned status of ->hub_control() in rh_call_control() in the USB core
HCD can be properly handled.

This patch also removes the OK() macro to make the code more readable.

Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/uhci-hub.c