Skip to content

Commit

Permalink
mdio: remove an unneed condition
Browse files Browse the repository at this point in the history
It used to be that mdio->irq was a pointer but after e7f4dc3
('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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jan 12, 2016
1 parent db9107b commit 1bc16ad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/of/of_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 1bc16ad

Please sign in to comment.