From: Wei Yongjun Date: Tue, 12 Jul 2016 11:00:09 +0000 (+0000) Subject: stmmac: dwmac-socfpga: fix wrong pointer passed to PTR_ERR() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b8fb41844ec9d6a437b0009f777039d845b1b04;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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); } } }