diff options
author | Joe Perches <joe@perches.com> | 2010-03-24 22:17:07 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:35:45 -0700 |
commit | 491dbc8d1ae56199ad199830d16c77c8317aa987 (patch) | |
tree | 0af96503de718dfb7961bbcfef88a91ae6a98b0e /drivers/staging/wlags49_h2/wl_priv.c | |
parent | Staging: vt6656: Hoist assign from if (diff) | |
download | linux-dev-491dbc8d1ae56199ad199830d16c77c8317aa987.tar.xz linux-dev-491dbc8d1ae56199ad199830d16c77c8317aa987.zip |
Staging: wlags49_h2: 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/wlags49_h2/wl_priv.c')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_priv.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/wlags49_h2/wl_priv.c b/drivers/staging/wlags49_h2/wl_priv.c index 727ea8a483af..a67ff529d359 100644 --- a/drivers/staging/wlags49_h2/wl_priv.c +++ b/drivers/staging/wlags49_h2/wl_priv.c @@ -503,7 +503,8 @@ int wvlan_uil_send_diag_msg( struct uilreq *urq, struct wl_private *lp ) return result; } - if ((data = kmalloc(urq->len, GFP_KERNEL)) != NULL) { + data = kmalloc(urq->len, GFP_KERNEL); + if (data != NULL) { memset( Descp, 0, sizeof( DESC_STRCT )); memcpy( data, urq->data, urq->len ); @@ -617,7 +618,8 @@ int wvlan_uil_put_info( struct uilreq *urq, struct wl_private *lp ) LTV record, try to allocate it from the kernel stack. Otherwise, we just use our local LTV record. */ if( urq->len > sizeof( lp->ltvRecord )) { - if(( pLtv = (ltv_t *)kmalloc( urq->len, GFP_KERNEL )) != NULL ) { + pLtv = (ltv_t *)kmalloc( urq->len, GFP_KERNEL ); + if (pLtv != NULL) { ltvAllocated = TRUE; } else { DBG_ERROR( DbgInfo, "Alloc FAILED\n" ); @@ -1296,7 +1298,8 @@ int wvlan_uil_get_info( struct uilreq *urq, struct wl_private *lp ) LTV record, try to allocate it from the kernel stack. Otherwise, we just use our local LTV record. */ if( urq->len > sizeof( lp->ltvRecord )) { - if(( pLtv = (ltv_t *)kmalloc( urq->len, GFP_KERNEL )) != NULL ) { + pLtv = (ltv_t *)kmalloc( urq->len, GFP_KERNEL ); + if (pLtv != NULL) { ltvAllocated = TRUE; /* Copy the command/length information into the new buffer. */ |