diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-01-12 10:35:34 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-12 17:51:57 +0100 |
commit | 1bc16addc0e92222958010537557b18e25a278c0 (patch) | |
tree | c21d835651b415ebbf88bc338a8e431c09d6550c /drivers/of/of_mdio.c | |
parent | mdio_bus: NULL dereference on allocation error (diff) | |
download | linux-1bc16addc0e92222958010537557b18e25a278c0.tar.xz linux-1bc16addc0e92222958010537557b18e25a278c0.zip |
mdio: remove an unneed condition
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>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r-- | drivers/of/of_mdio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index c0a8f84d92db..86829f8064a6 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -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")) |