staging: vt6656: s_nsBulkOutIoCompleteWrite add error handling,
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 19 Feb 2014 21:53:35 +0000 (21:53 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Feb 2014 00:57:44 +0000 (16:57 -0800)
change pContext->bBoolInUse to false on connection errors.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/usbpipe.c

index 16acc9a..61d8220 100644 (file)
@@ -616,6 +616,19 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
 
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n");
 
+       switch (urb->status) {
+       case 0:
+       case -ETIMEDOUT:
+               break;
+       case -ECONNRESET:
+       case -ENOENT:
+       case -ESHUTDOWN:
+               pContext->bBoolInUse = false;
+               return;
+       default:
+               break;
+       }
+
     if (!netif_device_present(pDevice->dev))
            return;