staging: vt6656: PIPEnsSendBulkOut reverse if statement
authorMalcolm Priestley <tvboxspy@gmail.com>
Tue, 25 Feb 2014 20:51:43 +0000 (20:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2014 21:04:36 +0000 (13:04 -0800)
Get rid of unnessary else statement by !(MP_IS_READY(pDevice) &&
pDevice->Flags & fMP_POST_WRITES)

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

index 1fc382d59a3fffdeb5432792a77a96e67a997ce2..a93d0ff46c01dd83970140fec981abf0f0c017c3 100644 (file)
@@ -548,7 +548,10 @@ int PIPEnsSendBulkOut(struct vnt_private *pDevice,
 
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_nsSendBulkOut\n");
 
-    if (MP_IS_READY(pDevice) && (pDevice->Flags & fMP_POST_WRITES)) {
+       if (!(MP_IS_READY(pDevice) && pDevice->Flags & fMP_POST_WRITES)) {
+               pContext->bBoolInUse = false;
+               return STATUS_RESOURCES;
+       }
 
         pUrb = pContext->pUrb;
         pDevice->ulBulkOutPosted++;
@@ -570,11 +573,6 @@ int PIPEnsSendBulkOut(struct vnt_private *pDevice,
                return STATUS_FAILURE;
        }
         return STATUS_PENDING;
-    }
-    else {
-        pContext->bBoolInUse = false;
-        return STATUS_RESOURCES;
-    }
 }
 
 /*