提交 7413f9a6 编写于 作者: V Vladimir Oltean 提交者: David S. Miller

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: NVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: NWong Vee Khee <vee.khee.wong@linux.intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 47538dbe
......@@ -7003,13 +7003,11 @@ 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) {
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);
if (ret) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册