Replace the pattern (!phy | IS_ERR(phy)) by the equivalent macro
IS_ERR_OR_NULL()

Signed-off-by: Tobias Klauser <[email protected]>
---
 drivers/net/phy/fixed_phy.c | 2 +-
 drivers/net/phy/mdio_bus.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index fb1299c..bde4378 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -330,7 +330,7 @@ struct phy_device *fixed_phy_register(unsigned int irq,
                return ERR_PTR(ret);
 
        phy = get_phy_device(fmb->mii_bus, phy_addr, false);
-       if (!phy || IS_ERR(phy)) {
+       if (IS_ERR_OR_NULL(phy)) {
                fixed_phy_del(phy_addr);
                return ERR_PTR(-EINVAL);
        }
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 02a4615..4a48d6a 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -341,7 +341,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int 
addr)
        int err;
 
        phydev = get_phy_device(bus, addr, false);
-       if (IS_ERR(phydev) || phydev == NULL)
+       if (IS_ERR_OR_NULL(phydev))
                return phydev;
 
        /*
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to