Commit b96ab7cc authored by Mark Einon's avatar Mark Einon Committed by Greg Kroah-Hartman

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: default avatarMark Einon <mark.einon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 58b179dc
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment