From: Felipe Balbi Date: Thu, 26 Feb 2015 16:55:13 +0000 (-0600) Subject: usb: musb: dsps: return error code if reset fails X-Git-Tag: firefly_0821_release~176^2~2000^2~4^2~112 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d0cddae7926f39e8fd488f62496cfebf7a5e757d;p=firefly-linux-kernel-4.4.55.git usb: musb: dsps: return error code if reset fails if reset fails, we should return a *negative* error code, not a positive value. Tested-by: Bin Liu Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index a900c9877195..af614f49cd98 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -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 = {