stmmac: fix an error code in stmmac_ptp_register()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Oct 2016 19:26:11 +0000 (22:26 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Oct 2016 21:35:30 +0000 (17:35 -0400)
commit50756ebecf69276b8a908409fa32c123bb12420b
tree4c92bc7d6168728e80b465240d56a143e9dd52ef
parent93966b715b32a783a1641f5a385901bbfab04733
stmmac: fix an error code in stmmac_ptp_register()

PTR_ERR(NULL) is success.  We have to preserve the error code earlier.

Fixes: 7086605a6ab5 ("stmmac: fix error check when init ptp")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c