mdio: remove an unneed condition
Subsystems (4)
PATCH 1/2 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.
Signed-off-by Dan Carpenter <[email protected]>
drivers/of/of_mdio.c +2 -4
@@ -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" ))
Quoted 5 lines · Dan Carpenter
It used to be that
mdio->irqwas a pointer but aftere7f4dc3536a4('mdio: Move allocation of interrupts into core') it's an array inside the mdio struct so it can never be NULL.Signed-off-by Dan Carpenter <[email protected]>
For both patches:
Reviewd-by Andrew Lunn <[email protected]>
Thanks
Andrew
Quoted 19 lines
drivers/of/of_mdio.c +2
-4@@ -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" ))
From: Dan Carpenter <[email protected]>
Date: Tue, 12 Jan 2016 12:35:34 +0300
Quoted 5 lines
It used to be that
mdio->irqwas a pointer but aftere7f4dc3536a4('mdio: Move allocation of interrupts into core') it's an array inside the mdio struct so it can never be NULL.Signed-off-by Dan Carpenter <[email protected]>
Applied.