staging: et131x: improve indenting in et131x_adjust_link()
Negate some 'if' checks to return early, allowing a large block of code to be un-indented. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
58b179dcf2
commit
b96ab7cc82
1 changed files with 86 additions and 84 deletions
|
@ -3754,7 +3754,11 @@ static void et131x_adjust_link(struct net_device *netdev)
|
|||
struct et131x_adapter *adapter = netdev_priv(netdev);
|
||||
struct phy_device *phydev = adapter->phydev;
|
||||
|
||||
if (phydev && phydev->link != adapter->link) {
|
||||
if (!phydev)
|
||||
return;
|
||||
if (phydev->link == adapter->link)
|
||||
return;
|
||||
|
||||
/* Check to see if we are in coma mode and if
|
||||
* so, disable it because we will not be able
|
||||
* to read PHY values until we are out.
|
||||
|
@ -3844,8 +3848,6 @@ static void et131x_adjust_link(struct net_device *netdev)
|
|||
et131x_disable_txrx(netdev);
|
||||
et131x_enable_txrx(netdev);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static int et131x_mii_probe(struct net_device *netdev)
|
||||
|
|
Loading…
Add table
Reference in a new issue