mdio: remove an unneed condition
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 12 Jan 2016 09:35:34 +0000 (12:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Jan 2016 16:51:57 +0000 (11:51 -0500)
It used to be that mdio->irq was a pointer but after e7f4dc3536a4
('mdio: Move allocation of interrupts into core') it's an array inside
the mdio struct so it can never be NULL.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/of/of_mdio.c

index c0a8f84d92db628abe1910b7e3fe0215997e24ef..86829f8064a61eb324a0a9ea28f63f0bf3ceadbd 100644 (file)
@@ -62,11 +62,9 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi
        rc = irq_of_parse_and_map(child, 0);
        if (rc > 0) {
                phy->irq = rc;
-               if (mdio->irq)
-                       mdio->irq[addr] = rc;
+               mdio->irq[addr] = rc;
        } else {
-               if (mdio->irq)
-                       phy->irq = mdio->irq[addr];
+               phy->irq = mdio->irq[addr];
        }
 
        if (of_property_read_bool(child, "broken-turn-around"))
This page took 0.026632 seconds and 5 git commands to generate.