Commit c4a432d3 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

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: default avatarAlex Elder <elder@linaro.org>
parent f0f61b90
...@@ -319,9 +319,10 @@ static void svc_in_callback(struct urb *urb) ...@@ -319,9 +319,10 @@ static void svc_in_callback(struct urb *urb)
int retval; int retval;
if (status) { if (status) {
if (status != -EAGAIN) if (status == -EAGAIN)
dev_err(dev, "urb svc in error %d (dropped)\n", status); goto exit;
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 /* 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) ...@@ -346,10 +347,10 @@ static void cport_in_callback(struct urb *urb)
u8 *data; u8 *data;
if (status) { if (status) {
if (status != -EAGAIN) if (status == -EAGAIN)
dev_err(dev, "urb cport in error %d (dropped)\n", goto exit;
status); dev_err(dev, "urb cport in error %d (dropped)\n", status);
goto exit; return;
} }
/* The size has to be at least one, for the cport id */ /* The size has to be at least one, for the cport id */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment