[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1468321209-15732-1-git-send-email-weiyj_lk@163.com>
Date: Tue, 12 Jul 2016 11:00:09 +0000
From: weiyj_lk@....com
To: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...com>,
Tien Hock Loh <thloh@...era.com>
Cc: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>, netdev@...r.kernel.org
Subject: [PATCH -next] stmmac: dwmac-socfpga: fix wrong pointer passed to PTR_ERR()
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
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@...ndmicro.com.cn>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 4bee2f9..3bc1fa2 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);
}
}
}
Powered by blists - more mailing lists