gregkh/usbutils — pull request #22 by johnfreed (2014-05-07 15:04:18+00:00)
Title: Fix logic error

Error was introduced in 13ef0becc9d5606a27385c0c2cdd38db1085fb6b

libusb_control_transfer returns negative values indicating libusb
error codes on failure. A non-negative return indicates number of
bytes returned. So a failure of LIBUSB_ERROR_PIPE (-9) for instance
would instead, if using the absolute value, indicate a successful
9-byte return. Logic around the hub descriptor was rewritten
to (hopefully) make it clearer.