diff options
author | YueHaibing <yuehaibing@huawei.com> | 2020-01-07 22:14:54 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-07 13:46:42 -0800 |
commit | 4addbcb387c9519b320a9411cad68f0c01e9ed4b (patch) | |
tree | 7a169daabee4ba5d3148b6ef661d3d344d57d982 /drivers/net/ethernet | |
parent | 0d6e5bfc9c5bc852d240cb35b0d850cdb660c4c9 (diff) |
enetc: Fix inconsistent IS_ERR and PTR_ERR
The proper pointer to be passed as argument is hw
Detected using Coccinelle.
Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c index 87c0e969da40..ebc635f8a4cc 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c @@ -27,7 +27,7 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev, } hw = enetc_hw_alloc(dev, port_regs); - if (IS_ERR(enetc_hw_alloc)) { + if (IS_ERR(hw)) { err = PTR_ERR(hw); goto err_hw_alloc; } |