lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d314cf287493de6f5d036254f445f8ed463bcbec.1269493047.git.joe@perches.com>
Date:	Wed, 24 Mar 2010 22:17:00 -0700
From:	Joe Perches <joe@...ches.com>
To:	linux-kernel@...r.kernel.org
Cc:	Greg Kroah-Hartman <gregkh@...e.de>, devel@...verdev.osuosl.org
Subject: [PATCH 06/13] drivers/staging/rt2870: Hoist assign from if


Signed-off-by: Joe Perches <joe@...ches.com>
---
 drivers/staging/rt2870/common/rtusb_bulk.c |   15 ++++++++++-----
 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 379780c..23e52ff 100644
--- a/drivers/staging/rt2870/common/rtusb_bulk.c
+++ b/drivers/staging/rt2870/common/rtusb_bulk.c
@@ -475,7 +475,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));
@@ -573,7 +574,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;
@@ -667,7 +669,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));
@@ -742,7 +745,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;
@@ -799,7 +803,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 cf0d2f5..f0b6972 100644
--- a/drivers/staging/rt2870/common/rtusb_io.c
+++ b/drivers/staging/rt2870/common/rtusb_io.c
@@ -1169,11 +1169,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
@@ -1545,7 +1544,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->
-- 
1.7.0.14.g7e948

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ