diff options
author | Colin Ian King <colin.king@canonical.com> | 2016-08-15 15:55:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-15 23:38:44 +0300 |
commit | cfaace269d0ce5a4ae26bfe442f1c4df1a9558de (patch) | |
tree | 84cddac5be991c9d0bb03ec64e89f2dcb56186af /drivers/net/ethernet/hisilicon | |
parent | 2eb03e6c4e305b71bdd2d0ce4250b9c9099d9128 (diff) | |
download | linux-cfaace269d0ce5a4ae26bfe442f1c4df1a9558de.tar.xz |
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: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c index 5c8afe1a5ccb..a834774fdb02 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c @@ -684,8 +684,7 @@ hns_mac_register_phydev(struct mii_bus *mdio, struct hns_mac_cb *mac_cb, if (!phy || IS_ERR(phy)) return -EIO; - if (mdio->irq) - phy->irq = mdio->irq[addr]; + phy->irq = mdio->irq[addr]; /* All data is now stored in the phy struct; * register it |