Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: rt2870: Hoist assign from if

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Joe Perches and committed by
Greg Kroah-Hartman
699910dd 6aed5295

+15 -10
+10 -5
drivers/staging/rt2870/common/rtusb_bulk.c
··· 474 474 (usb_complete_t) RTUSBBulkOutDataPacketComplete); 475 475 476 476 pUrb = pHTTXContext->pUrb; 477 - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { 477 + ret = RTUSB_SUBMIT_URB(pUrb); 478 + if (ret != 0) { 478 479 DBGPRINT(RT_DEBUG_ERROR, 479 480 ("RTUSBBulkOutDataPacket: Submit Tx URB failed %d\n", 480 481 ret)); ··· 573 572 (usb_complete_t) RTUSBBulkOutNullFrameComplete); 574 573 575 574 pUrb = pNullContext->pUrb; 576 - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { 575 + ret = RTUSB_SUBMIT_URB(pUrb); 576 + if (ret != 0) { 577 577 RTMP_IRQ_LOCK(&pAd->BulkOutLock[0], IrqFlags); 578 578 pAd->BulkOutPending[0] = FALSE; 579 579 pAd->watchDogTxPendingCnt[0] = 0; ··· 668 666 pUrb->transfer_flags &= (~URB_NO_TRANSFER_DMA_MAP); 669 667 670 668 pUrb = pMLMEContext->pUrb; 671 - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { 669 + ret = RTUSB_SUBMIT_URB(pUrb); 670 + if (ret != 0) { 672 671 DBGPRINT(RT_DEBUG_ERROR, 673 672 ("RTUSBBulkOutMLMEPacket: Submit MLME URB failed %d\n", 674 673 ret)); ··· 744 741 (usb_complete_t) RTUSBBulkOutPsPollComplete); 745 742 746 743 pUrb = pPsPollContext->pUrb; 747 - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { 744 + ret = RTUSB_SUBMIT_URB(pUrb); 745 + if (ret != 0) { 748 746 RTMP_IRQ_LOCK(&pAd->BulkOutLock[0], IrqFlags); 749 747 pAd->BulkOutPending[0] = FALSE; 750 748 pAd->watchDogTxPendingCnt[0] = 0; ··· 802 798 RTUSBInitRxDesc(pAd, pRxContext); 803 799 804 800 pUrb = pRxContext->pUrb; 805 - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { /* fail */ 801 + ret = RTUSB_SUBMIT_URB(pUrb); 802 + if (ret != 0) { /* fail */ 806 803 807 804 RTMP_IRQ_LOCK(&pAd->BulkInLock, IrqFlags); 808 805 pRxContext->InUse = FALSE;
+5 -5
drivers/staging/rt2870/common/rtusb_io.c
··· 1167 1167 (usb_complete_t) 1168 1168 RTUSBBulkOutDataPacketComplete); 1169 1169 1170 - if ((ret = 1171 - RTUSB_SUBMIT_URB 1170 + ret = RTUSB_SUBMIT_URB 1172 1171 (pHTTXContext-> 1173 - pUrb)) != 1174 - 0) { 1172 + pUrb); 1173 + if (ret != 0) { 1175 1174 RTMP_INT_LOCK 1176 1175 (&pAd-> 1177 1176 BulkOutLock ··· 1539 1540 RTUSBInitRxDesc(pAd, 1540 1541 pRxContext); 1541 1542 pUrb = pRxContext->pUrb; 1542 - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { /* fail */ 1543 + ret = RTUSB_SUBMIT_URB(pUrb); 1544 + if (ret != 0) { /* fail */ 1543 1545 1544 1546 RTMP_IRQ_LOCK 1545 1547 (&pAd->