Skip to content

Commit

Permalink
enetc: Fix inconsistent IS_ERR and PTR_ERR
Browse files Browse the repository at this point in the history
The proper pointer to be passed as argument is hw
Detected using Coccinelle.

Fixes: 6517798 ("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>
  • Loading branch information
YueHaibing authored and David S. Miller committed Jan 7, 2020
1 parent 0d6e5bf commit 4addbcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4addbcb

Please sign in to comment.