diff options
author | Joe Perches <joe@perches.com> | 2010-03-25 05:17:07 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 18:35:45 (GMT) |
commit | 491dbc8d1ae56199ad199830d16c77c8317aa987 (patch) | |
tree | 0af96503de718dfb7961bbcfef88a91ae6a98b0e /drivers/staging/wlags49_h2/wl_netdev.c | |
parent | bfbfeecca6957d749b95540626a6c348dc8d9301 (diff) | |
download | linux-fsl-qoriq-491dbc8d1ae56199ad199830d16c77c8317aa987.tar.xz |
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_netdev.c')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_netdev.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c index 1db73eb..1cfaee3 100644 --- a/drivers/staging/wlags49_h2/wl_netdev.c +++ b/drivers/staging/wlags49_h2/wl_netdev.c @@ -930,8 +930,10 @@ int wl_rx(struct net_device *dev) port = ( hfs_stat >> 8 ) & 0x0007; DBG_RX( DbgInfo, "Rx frame for port %d\n", port ); - if(( pktlen = lp->hcfCtx.IFB_RxLen ) != 0 ) { - if(( skb = ALLOC_SKB( pktlen )) != NULL ) { + pktlen = lp->hcfCtx.IFB_RxLen; + if (pktlen != 0) { + skb = ALLOC_SKB(pktlen); + if (skb != NULL) { /* Set the netdev based on the port */ switch( port ) { #ifdef USE_WDS @@ -1995,8 +1997,10 @@ int wl_rx_dma( struct net_device *dev ) port = ( hfs_stat >> 8 ) & 0x0007; DBG_RX( DbgInfo, "Rx frame for port %d\n", port ); - if(( pktlen = GET_BUF_CNT( desc_next )) != 0 ) { - if(( skb = ALLOC_SKB( pktlen )) != NULL ) { + pktlen = GET_BUF_CNT(desc_next); + if (pktlen != 0) { + skb = ALLOC_SKB(pktlen); + if (skb != NULL) { switch( port ) { #ifdef USE_WDS case 1: |