提交 1bc16add 编写于 作者: D Dan Carpenter 提交者: David S. Miller

mdio: remove an unneed condition

It used to be that mdio->irq was a pointer but after e7f4dc35
('mdio: Move allocation of interrupts into core') it's an array inside
the mdio struct so it can never be NULL.
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 db9107b4
......@@ -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"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册