aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8187se/r8180_core.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-03-24 22:17:01 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-11 11:35:44 -0700
commit53756de3831fb9aac83e4766221aac3bf6f6cfe7 (patch)
tree194d364067ef5133d79d98dda79d4c39e11f1bf9 /drivers/staging/rtl8187se/r8180_core.c
parent699910dd756d782a9d281414d20c89ef94302177 (diff)
Staging: rtl8187se: Hoist assign from if
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8187se/r8180_core.c')
-rw-r--r--drivers/staging/rtl8187se/r8180_core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 55d12e3271d..88fe6232a47 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;
}