enetc: Fix inconsistent IS_ERR and PTR_ERR
authorYueHaibing <yuehaibing@huawei.com>
Tue, 7 Jan 2020 14:14:54 +0000 (22:14 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jan 2020 21:46:42 +0000 (13:46 -0800)
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>
drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c

index 87c0e96..ebc635f 100644 (file)
@@ -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;
        }