diff options
author | Joe Perches <joe@perches.com> | 2010-03-24 22:17:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:35:44 -0700 |
commit | 699910dd756d782a9d281414d20c89ef94302177 (patch) | |
tree | 6733da1ead127b6a91832c944e83c09a20de7890 | |
parent | 6aed5295ae93fc7947ee50eb2789655b88f6c941 (diff) | |
download | op-kernel-dev-699910dd756d782a9d281414d20c89ef94302177.zip op-kernel-dev-699910dd756d782a9d281414d20c89ef94302177.tar.gz |
Staging: rt2870: Hoist assign from if
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/rt2870/common/rtusb_bulk.c | 15 | ||||
-rw-r--r-- | drivers/staging/rt2870/common/rtusb_io.c | 10 |
2 files changed, 15 insertions, 10 deletions
diff --git a/drivers/staging/rt2870/common/rtusb_bulk.c b/drivers/staging/rt2870/common/rtusb_bulk.c index 625b872..d2746f8 100644 --- a/drivers/staging/rt2870/common/rtusb_bulk.c +++ b/drivers/staging/rt2870/common/rtusb_bulk.c @@ -474,7 +474,8 @@ void RTUSBBulkOutDataPacket(struct rt_rtmp_adapter *pAd, (usb_complete_t) RTUSBBulkOutDataPacketComplete); pUrb = pHTTXContext->pUrb; - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { + ret = RTUSB_SUBMIT_URB(pUrb); + if (ret != 0) { DBGPRINT(RT_DEBUG_ERROR, ("RTUSBBulkOutDataPacket: Submit Tx URB failed %d\n", ret)); @@ -572,7 +573,8 @@ void RTUSBBulkOutNullFrame(struct rt_rtmp_adapter *pAd) (usb_complete_t) RTUSBBulkOutNullFrameComplete); pUrb = pNullContext->pUrb; - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { + ret = RTUSB_SUBMIT_URB(pUrb); + if (ret != 0) { RTMP_IRQ_LOCK(&pAd->BulkOutLock[0], IrqFlags); pAd->BulkOutPending[0] = FALSE; pAd->watchDogTxPendingCnt[0] = 0; @@ -666,7 +668,8 @@ void RTUSBBulkOutMLMEPacket(struct rt_rtmp_adapter *pAd, u8 Index) pUrb->transfer_flags &= (~URB_NO_TRANSFER_DMA_MAP); pUrb = pMLMEContext->pUrb; - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { + ret = RTUSB_SUBMIT_URB(pUrb); + if (ret != 0) { DBGPRINT(RT_DEBUG_ERROR, ("RTUSBBulkOutMLMEPacket: Submit MLME URB failed %d\n", ret)); @@ -741,7 +744,8 @@ void RTUSBBulkOutPsPoll(struct rt_rtmp_adapter *pAd) (usb_complete_t) RTUSBBulkOutPsPollComplete); pUrb = pPsPollContext->pUrb; - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { + ret = RTUSB_SUBMIT_URB(pUrb); + if (ret != 0) { RTMP_IRQ_LOCK(&pAd->BulkOutLock[0], IrqFlags); pAd->BulkOutPending[0] = FALSE; pAd->watchDogTxPendingCnt[0] = 0; @@ -798,7 +802,8 @@ void DoBulkIn(struct rt_rtmp_adapter *pAd) RTUSBInitRxDesc(pAd, pRxContext); pUrb = pRxContext->pUrb; - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { /* fail */ + ret = RTUSB_SUBMIT_URB(pUrb); + if (ret != 0) { /* fail */ RTMP_IRQ_LOCK(&pAd->BulkInLock, IrqFlags); pRxContext->InUse = FALSE; diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c index cde38fe..6b9ca24 100644 --- a/drivers/staging/rt2870/common/rtusb_io.c +++ b/drivers/staging/rt2870/common/rtusb_io.c @@ -1167,11 +1167,10 @@ void CMDHandler(struct rt_rtmp_adapter *pAd) (usb_complete_t) RTUSBBulkOutDataPacketComplete); - if ((ret = - RTUSB_SUBMIT_URB + ret = RTUSB_SUBMIT_URB (pHTTXContext-> - pUrb)) != - 0) { + pUrb); + if (ret != 0) { RTMP_INT_LOCK (&pAd-> BulkOutLock @@ -1540,7 +1539,8 @@ void CMDHandler(struct rt_rtmp_adapter *pAd) RTUSBInitRxDesc(pAd, pRxContext); pUrb = pRxContext->pUrb; - if ((ret = RTUSB_SUBMIT_URB(pUrb)) != 0) { /* fail */ + ret = RTUSB_SUBMIT_URB(pUrb); + if (ret != 0) { /* fail */ RTMP_IRQ_LOCK (&pAd-> |