diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-03-04 21:21:09 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-07 21:23:12 (GMT) |
commit | 338d1ad1ad48669bf45c312a2400944dfcdb1db0 (patch) | |
tree | a9a63b51acd20deed02f1ce25e776a397dfba878 /drivers | |
parent | ee3a6366744acbd3ce3019290aad7ebf839bce62 (diff) | |
download | linux-338d1ad1ad48669bf45c312a2400944dfcdb1db0.tar.xz |
staging: silicom : remove assignment in if condition
This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/silicom/bpctl_mod.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index f4aea92..6b9365b 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -2306,11 +2306,10 @@ static int set_tx(struct bpctl_dev *pbpctl_dev, int tx_state) if (PEG5_IF_SERIES(pbpctl_dev->subdevice)) { if (tx_state) { uint16_t mii_reg; - if (! - (ret = - bp75_read_phy_reg(pbpctl_dev, - BPCTLI_PHY_CONTROL, - &mii_reg))) { + ret = bp75_read_phy_reg(pbpctl_dev, + BPCTLI_PHY_CONTROL, + &mii_reg); + if (!ret) { if (mii_reg & BPCTLI_MII_CR_POWER_DOWN) { ret = bp75_write_phy_reg @@ -2322,17 +2321,15 @@ static int set_tx(struct bpctl_dev *pbpctl_dev, int tx_state) } } else { uint16_t mii_reg; - if (! - (ret = - bp75_read_phy_reg(pbpctl_dev, - BPCTLI_PHY_CONTROL, - &mii_reg))) { + ret = bp75_read_phy_reg(pbpctl_dev, + BPCTLI_PHY_CONTROL, + &mii_reg); + if (!ret) { mii_reg |= BPCTLI_MII_CR_POWER_DOWN; - ret = - bp75_write_phy_reg(pbpctl_dev, - BPCTLI_PHY_CONTROL, - mii_reg); + ret = bp75_write_phy_reg(pbpctl_dev, + BPCTLI_PHY_CONTROL, + mii_reg); } } |