usb: musb: dsps: return error code if reset fails
authorFelipe Balbi <balbi@ti.com>
Thu, 26 Feb 2015 16:55:13 +0000 (10:55 -0600)
committerFelipe Balbi <balbi@ti.com>
Tue, 10 Mar 2015 20:33:25 +0000 (15:33 -0500)
if reset fails, we should return a *negative*
error code, not a positive value.

Tested-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_dsps.c

index a900c9877195ad6ef2048ddb8c2813c8e196feed..af614f49cd980ecb15ecd5e8415790ca99469b78 100644 (file)
@@ -652,7 +652,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 = {