From: Joe Perches Date: Thu, 25 Mar 2010 05:17:01 +0000 (-0700) Subject: Staging: rtl8187se: Hoist assign from if X-Git-Tag: MMI-PSA29.97-13-9~23841^2^2~441 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=53756de3831fb9aac83e4766221aac3bf6f6cfe7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: rtl8187se: Hoist assign from if Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c index be2d17f60c35..5fdb8f3df0a7 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c @@ -1555,7 +1555,8 @@ ieee80211_rx_auth_rq(struct ieee80211_device *ieee, struct sk_buff *skb) //IEEE80211DMESG("Rx probe"); ieee->softmac_stats.rx_auth_rq++; - if ((status = auth_rq_parse(skb, dest))!= -1){ + status = auth_rq_parse(skb, dest); + if (status != -1) { ieee80211_resp_to_auth(ieee, status, dest); } //DMESG("Dest is "MACSTR, MAC2STR(dest)); diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 55d12e3271de..88fe6232a47d 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -403,7 +403,8 @@ short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma, tmp=*buffer; while(tmp->next!=(*buffer)) tmp=tmp->next; - if ((tmp->next= kmalloc(sizeof(struct buffer),GFP_KERNEL)) == NULL){ + tmp->next = kmalloc(sizeof(struct buffer),GFP_KERNEL); + if (tmp->next == NULL) { DMESGE("Failed to kmalloc TX/RX struct"); return -1; } @@ -1155,7 +1156,8 @@ short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count) tmp=desc; for (i = 0; i < count; i++) { - if ((buf= kmalloc(bufsize * sizeof(u8),GFP_ATOMIC)) == NULL){ + buf = kmalloc(bufsize * sizeof(u8),GFP_ATOMIC); + if (buf == NULL) { DMESGE("Failed to kmalloc RX buffer"); return -1; }