diff options
author | Joe Perches <joe@perches.com> | 2010-03-25 05:17:01 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 18:35:44 (GMT) |
commit | 53756de3831fb9aac83e4766221aac3bf6f6cfe7 (patch) | |
tree | 194d364067ef5133d79d98dda79d4c39e11f1bf9 /drivers/staging/rtl8187se/r8180_core.c | |
parent | 699910dd756d782a9d281414d20c89ef94302177 (diff) | |
download | linux-fsl-qoriq-53756de3831fb9aac83e4766221aac3bf6f6cfe7.tar.xz |
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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 55d12e3..88fe623 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; } |