Works in APL platform.

Tested-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kupusw...@linux.intel.com>


On 11/09/2017 02:59 AM, Felipe Balbi wrote:
usb_control_msg() will return the amount of bytes transferred, if that
amount matches what we wanted to transfer, we need to reset 'ret' to 0
from usb_get_status().

Fixes: 2e43f0fe379c ("usb: core: add a 'type' parameter to usb_get_status()")
Reported-by: Tony Lindgren <t...@atomide.com>
Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com>
---
  drivers/usb/core/message.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 0cdc463c9509..c15fbf76f8f7 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -975,6 +975,7 @@ int usb_get_status(struct usb_device *dev, int recip, int 
type, int target,
                }
*(u32 *) data = le32_to_cpu(*(__le32 *) status);
+               ret = 0;
                break;
        case 2:
                if (type != USB_STATUS_TYPE_STANDARD) {
@@ -983,6 +984,7 @@ int usb_get_status(struct usb_device *dev, int recip, int 
type, int target,
                }
*(u16 *) data = le16_to_cpu(*(__le16 *) status);
+               ret = 0;
                break;
        default:
                ret = -EIO;

--
Sathyanarayanan Kuppuswamy
Linux kernel developer

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to