Staging: rt2860: Hoist assign from if

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Joe Perches 2010-03-24 22:16:59 -07:00 committed by Greg Kroah-Hartman
parent 62fa452648
commit 6aed5295ae
4 changed files with 20 additions and 18 deletions

View File

@ -773,7 +773,8 @@ void RTMPDeQueuePacket(struct rt_rtmp_adapter *pAd, IN BOOLEAN bIntContext, u8 Q
/* probe the Queue Head */ /* probe the Queue Head */
pQueue = &pAd->TxSwQueue[QueIdx]; pQueue = &pAd->TxSwQueue[QueIdx];
if ((pEntry = pQueue->Head) == NULL) { pEntry = pQueue->Head;
if (pEntry == NULL) {
DEQUEUE_UNLOCK(&pAd->irq_lock, bIntContext, DEQUEUE_UNLOCK(&pAd->irq_lock, bIntContext,
IrqFlags); IrqFlags);
break; break;
@ -824,7 +825,8 @@ void RTMPDeQueuePacket(struct rt_rtmp_adapter *pAd, IN BOOLEAN bIntContext, u8 Q
} }
do { do {
if ((pEntry = pQueue->Head) == NULL) pEntry = pQueue->Head;
if (pEntry == NULL)
break; break;
/* For TX_AMSDU_FRAME/TX_RALINK_FRAME, Need to check if next pakcet can do aggregation. */ /* For TX_AMSDU_FRAME/TX_RALINK_FRAME, Need to check if next pakcet can do aggregation. */

View File

@ -2928,25 +2928,23 @@ void WpaShowAllsuite(u8 *rsnie, u32 rsnie_len)
hex_dump("RSNIE", rsnie, rsnie_len); hex_dump("RSNIE", rsnie, rsnie_len);
/* group cipher */ /* group cipher */
if ((pSuite = pSuite = GetSuiteFromRSNIE(rsnie, rsnie_len, GROUP_SUITE, &count);
GetSuiteFromRSNIE(rsnie, rsnie_len, GROUP_SUITE, if (pSuite != NULL) {
&count)) != NULL) {
hex_dump("group cipher", pSuite, 4 * count); hex_dump("group cipher", pSuite, 4 * count);
} }
/* pairwise cipher */ /* pairwise cipher */
if ((pSuite = pSuite = GetSuiteFromRSNIE(rsnie, rsnie_len, PAIRWISE_SUITE, &count);
GetSuiteFromRSNIE(rsnie, rsnie_len, PAIRWISE_SUITE, if (pSuite != NULL) {
&count)) != NULL) {
hex_dump("pairwise cipher", pSuite, 4 * count); hex_dump("pairwise cipher", pSuite, 4 * count);
} }
/* AKM */ /* AKM */
if ((pSuite = pSuite = GetSuiteFromRSNIE(rsnie, rsnie_len, AKM_SUITE, &count);
GetSuiteFromRSNIE(rsnie, rsnie_len, AKM_SUITE, &count)) != NULL) { if (pSuite != NULL) {
hex_dump("AKM suite", pSuite, 4 * count); hex_dump("AKM suite", pSuite, 4 * count);
} }
/* PMKID */ /* PMKID */
if ((pSuite = pSuite = GetSuiteFromRSNIE(rsnie, rsnie_len, PMKID_LIST, &count);
GetSuiteFromRSNIE(rsnie, rsnie_len, PMKID_LIST, &count)) != NULL) { if (pSuite != NULL) {
hex_dump("PMKID", pSuite, LEN_PMKID); hex_dump("PMKID", pSuite, LEN_PMKID);
} }

View File

@ -1900,8 +1900,8 @@ static void PeerMeasureReportAction(struct rt_rtmp_adapter *pAd,
/* if (pAd->CommonCfg.bIEEE80211H != TRUE) */ /* if (pAd->CommonCfg.bIEEE80211H != TRUE) */
/* return; */ /* return; */
if ((pMeasureReportInfo = pMeasureReportInfo = kmalloc(sizeof(struct rt_measure_rpi_report), GFP_ATOMIC);
kmalloc(sizeof(struct rt_measure_rpi_report), GFP_ATOMIC)) == NULL) { if (pMeasureReportInfo == NULL) {
DBGPRINT(RT_DEBUG_ERROR, DBGPRINT(RT_DEBUG_ERROR,
("%s unable to alloc memory for measure report buffer (size=%zu).\n", ("%s unable to alloc memory for measure report buffer (size=%zu).\n",
__func__, sizeof(struct rt_measure_rpi_report))); __func__, sizeof(struct rt_measure_rpi_report)));
@ -2016,7 +2016,8 @@ static void PeerTpcRepAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_e
NdisZeroMemory(&TpcRepInfo, sizeof(struct rt_tpc_report_info)); NdisZeroMemory(&TpcRepInfo, sizeof(struct rt_tpc_report_info));
if (PeerTpcRepSanity if (PeerTpcRepSanity
(pAd, Elem->Msg, Elem->MsgLen, &DialogToken, &TpcRepInfo)) { (pAd, Elem->Msg, Elem->MsgLen, &DialogToken, &TpcRepInfo)) {
if ((pEntry = TpcReqLookUp(pAd, DialogToken)) != NULL) { pEntry = TpcReqLookUp(pAd, DialogToken);
if (pEntry != NULL) {
TpcReqDelete(pAd, pEntry->DialogToken); TpcReqDelete(pAd, pEntry->DialogToken);
DBGPRINT(RT_DEBUG_TRACE, DBGPRINT(RT_DEBUG_TRACE,
("%s: DialogToken=%x, TxPwr=%d, LinkMargin=%d\n", ("%s: DialogToken=%x, TxPwr=%d, LinkMargin=%d\n",

View File

@ -463,8 +463,8 @@ void *duplicate_pkt(struct rt_rtmp_adapter *pAd,
struct sk_buff *skb; struct sk_buff *skb;
void *pPacket = NULL; void *pPacket = NULL;
if ((skb = skb = __dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG);
__dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG)) != NULL) { if (skb != NULL) {
skb_reserve(skb, 2); skb_reserve(skb, 2);
NdisMoveMemory(skb_tail_pointer(skb), pHeader802_3, HdrLen); NdisMoveMemory(skb_tail_pointer(skb), pHeader802_3, HdrLen);
skb_put(skb, HdrLen); skb_put(skb, HdrLen);
@ -673,7 +673,8 @@ void RTMPSendWirelessEvent(struct rt_rtmp_adapter *pAd,
return; return;
} }
/*Allocate memory and copy the msg. */ /*Allocate memory and copy the msg. */
if ((pBuf = kmalloc(IW_CUSTOM_MAX_LEN, GFP_ATOMIC)) != NULL) { pBuf = kmalloc(IW_CUSTOM_MAX_LEN, GFP_ATOMIC);
if (pBuf != NULL) {
/*Prepare the payload */ /*Prepare the payload */
memset(pBuf, 0, IW_CUSTOM_MAX_LEN); memset(pBuf, 0, IW_CUSTOM_MAX_LEN);