aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-06-11 23:05:21 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-11 13:43:55 -0700
commit7413f9a6af00bb4dc0ef01944aceb8e2ee17a8d5 (patch)
tree36fc2415e3580d69386e4dd9e37bf8cdcb5f9a98 /drivers/net/ethernet/stmicro
parentnet: stmmac: reverse Christmas tree notation in stmmac_xpcs_setup (diff)
downloadlinux-dev-7413f9a6af00bb4dc0ef01944aceb8e2ee17a8d5.tar.xz
linux-dev-7413f9a6af00bb4dc0ef01944aceb8e2ee17a8d5.zip
net: stmmac: reduce indentation when calling stmmac_xpcs_setup
There is no reason to embed an if within an if, we can just logically AND the two conditions. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Wong Vee Khee <vee.khee.wong@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4177fd6a9db5..16820873b01d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7003,12 +7003,10 @@ int stmmac_dvr_probe(struct device *device,
if (priv->plat->speed_mode_2500)
priv->plat->speed_mode_2500(ndev, priv->plat->bsp_priv);
- if (priv->plat->mdio_bus_data) {
- if (priv->plat->mdio_bus_data->has_xpcs) {
- ret = stmmac_xpcs_setup(priv->mii);
- if (ret)
- goto error_xpcs_setup;
- }
+ if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) {
+ ret = stmmac_xpcs_setup(priv->mii);
+ if (ret)
+ goto error_xpcs_setup;
}
ret = stmmac_phy_setup(priv);