From: Alex Elder Date: Fri, 24 Oct 2014 10:02:02 +0000 (-0500) Subject: greybus: fix repeated input errors X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1963 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c4a432d3db8b9fa0145048ac4a84bac54c7a9d73;p=karo-tx-linux.git greybus: fix repeated input errors I screwed up the error handling in a patch the other day. If we get an error on an input URB we should not re-submit it. Signed-off-by: Alex Elder --- diff --git a/drivers/staging/greybus/es1-ap-usb.c b/drivers/staging/greybus/es1-ap-usb.c index 12eb9b2bee0f..bd416b4849bd 100644 --- a/drivers/staging/greybus/es1-ap-usb.c +++ b/drivers/staging/greybus/es1-ap-usb.c @@ -319,9 +319,10 @@ static void svc_in_callback(struct urb *urb) int retval; if (status) { - if (status != -EAGAIN) - dev_err(dev, "urb svc in error %d (dropped)\n", status); - goto exit; + if (status == -EAGAIN) + goto exit; + dev_err(dev, "urb svc in error %d (dropped)\n", status); + return; } /* We have a message, create a new message structure, add it to the @@ -346,10 +347,10 @@ static void cport_in_callback(struct urb *urb) u8 *data; if (status) { - if (status != -EAGAIN) - dev_err(dev, "urb cport in error %d (dropped)\n", - status); - goto exit; + if (status == -EAGAIN) + goto exit; + dev_err(dev, "urb cport in error %d (dropped)\n", status); + return; } /* The size has to be at least one, for the cport id */