Commit 53b44cb9 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

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: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 21f49468
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment