From: Viresh Kumar Date: Thu, 21 Apr 2016 06:01:15 +0000 (+0530) Subject: greybus: es2: don't protest when getting -ENOENT/ESHUTDOWN USB errors X-Git-Tag: v5.15~12752^2~378^2~21^2~507 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62de6e0a7262edebc4debd99585b19dc10d2741d;p=platform%2Fkernel%2Flinux-starfive.git greybus: es2: don't protest when getting -ENOENT/ESHUTDOWN USB errors -ENOENT or -ESHUTDOWN happens when the urbs are being killed from ->disconnect() callback. Don't complain to userspace about this, as the user will see this on es2 module removal. Tested by removing the gb-es2.ko module on both EVT1.5 and qemu with gbsim. The driver doesn't throw anymore errors like: "urb cport in error -2 (dropped)". Signed-off-by: Viresh Kumar Tested-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index 8138bc2..0a29708 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -715,6 +715,11 @@ static void cport_in_callback(struct urb *urb) if (status) { if ((status == -EAGAIN) || (status == -EPROTO)) goto exit; + + /* The urb is being unlinked */ + if (status == -ENOENT || status == -ESHUTDOWN) + return; + dev_err(dev, "urb cport in error %d (dropped)\n", status); return; }