Commit cfaace26 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

net: hns: mdio->irq is an array, so no need to check if it is null

The null check on mdio->irq is redundant since mdio->irq is an array
of PHY_MAX_ADDR ints and hence can never be null. Remove the redundant
check.
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2eb03e6c
...@@ -684,8 +684,7 @@ hns_mac_register_phydev(struct mii_bus *mdio, struct hns_mac_cb *mac_cb, ...@@ -684,8 +684,7 @@ hns_mac_register_phydev(struct mii_bus *mdio, struct hns_mac_cb *mac_cb,
if (!phy || IS_ERR(phy)) if (!phy || IS_ERR(phy))
return -EIO; return -EIO;
if (mdio->irq) phy->irq = mdio->irq[addr];
phy->irq = mdio->irq[addr];
/* All data is now stored in the phy struct; /* All data is now stored in the phy struct;
* register it * register it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment