Commit efd89b60 authored by LABBE Corentin's avatar LABBE Corentin Committed by David S. Miller

net: stmmac: fix some code style problem

Checkpatch complains about some code style problem on stmmac_mdio.c.
This patch fix them.
Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bbf89284
...@@ -152,9 +152,9 @@ int stmmac_mdio_reset(struct mii_bus *bus) ...@@ -152,9 +152,9 @@ int stmmac_mdio_reset(struct mii_bus *bus)
#ifdef CONFIG_OF #ifdef CONFIG_OF
if (priv->device->of_node) { if (priv->device->of_node) {
if (data->reset_gpio < 0) { if (data->reset_gpio < 0) {
struct device_node *np = priv->device->of_node; struct device_node *np = priv->device->of_node;
if (!np) if (!np)
return 0; return 0;
...@@ -221,7 +221,7 @@ int stmmac_mdio_register(struct net_device *ndev) ...@@ -221,7 +221,7 @@ int stmmac_mdio_register(struct net_device *ndev)
return 0; return 0;
new_bus = mdiobus_alloc(); new_bus = mdiobus_alloc();
if (new_bus == NULL) if (!new_bus)
return -ENOMEM; return -ENOMEM;
if (mdio_bus_data->irqs) if (mdio_bus_data->irqs)
...@@ -258,6 +258,7 @@ int stmmac_mdio_register(struct net_device *ndev) ...@@ -258,6 +258,7 @@ int stmmac_mdio_register(struct net_device *ndev)
found = 0; found = 0;
for (addr = 0; addr < PHY_MAX_ADDR; addr++) { for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
struct phy_device *phydev = mdiobus_get_phy(new_bus, addr); struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
if (phydev) { if (phydev) {
int act = 0; int act = 0;
char irq_num[4]; char irq_num[4];
...@@ -267,7 +268,7 @@ int stmmac_mdio_register(struct net_device *ndev) ...@@ -267,7 +268,7 @@ int stmmac_mdio_register(struct net_device *ndev)
* If an IRQ was provided to be assigned after * If an IRQ was provided to be assigned after
* the bus probe, do it here. * the bus probe, do it here.
*/ */
if ((mdio_bus_data->irqs == NULL) && if ((!mdio_bus_data->irqs) &&
(mdio_bus_data->probed_phy_irq > 0)) { (mdio_bus_data->probed_phy_irq > 0)) {
new_bus->irq[addr] = new_bus->irq[addr] =
mdio_bus_data->probed_phy_irq; mdio_bus_data->probed_phy_irq;
......
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