if reset fails, we should return a *negative*
error code, not a positive value.

Signed-off-by: Felipe Balbi <ba...@ti.com>
---
 drivers/usb/musb/musb_dsps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 53bd0e71d19f..7584601c96f3 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -629,7 +629,7 @@ static int dsps_musb_reset(struct musb *musb)
                session_restart = 1;
        }
 
-       return !session_restart;
+       return session_restart ? 0 : -EPIPE;
 }
 
 static struct musb_platform_ops dsps_ops = {
-- 
2.3.0

--
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