net: cavium: clean up return value check in cavium_ptp_probe

ptp_clock_register never return NULL, so no need check this
in cavium_ptp_probe.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
YueHaibing 2018-11-22 21:27:19 +08:00 committed by David S. Miller
parent 21f4946846
commit 53b44cb922

View File

@ -277,10 +277,6 @@ static int cavium_ptp_probe(struct pci_dev *pdev,
writeq(clock_comp, clock->reg_base + PTP_CLOCK_COMP);
clock->ptp_clock = ptp_clock_register(&clock->ptp_info, dev);
if (!clock->ptp_clock) {
err = -ENODEV;
goto error_stop;
}
if (IS_ERR(clock->ptp_clock)) {
err = PTR_ERR(clock->ptp_clock);
goto error_stop;