diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2016-10-12 16:42:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-13 18:00:51 +0300 |
commit | 7086605a6ab57a5a37eb613cfe214fc62d2bb87b (patch) | |
tree | 671b68f023864dcdec2101b586f22a08568cd10a /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |
parent | be9b3174c49109457c490a0ad8976aaeb3df5585 (diff) | |
download | linux-7086605a6ab57a5a37eb613cfe214fc62d2bb87b.tar.xz |
stmmac: fix error check when init ptp
This patch fixes a problem when propagated the
failure of ptp_clock_register to open function.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre TORGUE <alexandre.torgue@st.com>
Cc: Rayagond Kokatanur <rayagond@vayavyalabs.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index e838850cc7c3..6c85b61aaa0b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1709,8 +1709,8 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp) if (init_ptp) { ret = stmmac_init_ptp(priv); - if (ret && ret != -EOPNOTSUPP) - pr_warn("%s: failed PTP initialisation\n", __func__); + if (ret) + netdev_warn(priv->dev, "PTP support cannot init.\n"); } #ifdef CONFIG_DEBUG_FS |