Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 338d1ad1 authored by Himangi Saraogi's avatar Himangi Saraogi Committed by Greg Kroah-Hartman
Browse files

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: default avatarHimangi Saraogi <himangi774@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ee3a6366
Loading
Loading
Loading
Loading
+11 −14
Original line number Diff line number Diff line
@@ -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,
				ret = bp75_read_phy_reg(pbpctl_dev,
					      BPCTLI_PHY_CONTROL,
						       &mii_reg))) {
					      &mii_reg);
				if (!ret) {
					if (mii_reg & BPCTLI_MII_CR_POWER_DOWN) {
						ret =
						    bp75_write_phy_reg
@@ -2322,15 +2321,13 @@ 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,
				ret = bp75_read_phy_reg(pbpctl_dev,
					      BPCTLI_PHY_CONTROL,
						       &mii_reg))) {
					      &mii_reg);
				if (!ret) {

					mii_reg |= BPCTLI_MII_CR_POWER_DOWN;
					ret =
					    bp75_write_phy_reg(pbpctl_dev,
					ret = bp75_write_phy_reg(pbpctl_dev,
						       BPCTLI_PHY_CONTROL,
						       mii_reg);
				}