aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2016-07-12 11:00:09 +0000
committerDavid S. Miller <davem@davemloft.net>2016-07-12 11:07:38 -0700
commit2b8fb41844ec9d6a437b0009f777039d845b1b04 (patch)
treebb9fa92d71a6d9e2071733cff5428b05e5b17aca /drivers/net/ethernet/stmicro/stmmac
parenttools: hv: Add a script to help bonding synthetic and VF NICs (diff)
downloadlinux-dev-2b8fb41844ec9d6a437b0009f777039d845b1b04.tar.xz
linux-dev-2b8fb41844ec9d6a437b0009f777039d845b1b04.zip
stmmac: dwmac-socfpga: fix wrong pointer passed to PTR_ERR()
PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 4bee2f934a73..3bc1fa2c1001 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -214,7 +214,7 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
dev_err(dev,
"%s: ERROR: failed mapping tse control port\n",
__func__);
- return PTR_ERR(dwmac->pcs.sgmii_adapter_base);
+ return PTR_ERR(dwmac->pcs.tse_pcs_base);
}
}
}