diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-11-22 16:27:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-24 04:26:07 +0300 |
commit | 53b44cb9220e4ff7e3c091d91c94b2872b2f62d1 (patch) | |
tree | 85225422e3e64eea6f49d441aba987a5331ead26 /drivers/net/ethernet/cavium/common | |
parent | 21f49468466a41340ea389c25770dd38b7cbc748 (diff) | |
download | linux-53b44cb9220e4ff7e3c091d91c94b2872b2f62d1.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/cavium/common')
-rw-r--r-- | drivers/net/ethernet/cavium/common/cavium_ptp.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/ethernet/cavium/common/cavium_ptp.c b/drivers/net/ethernet/cavium/common/cavium_ptp.c index 6aeb1045c302..73632b843749 100644 --- a/drivers/net/ethernet/cavium/common/cavium_ptp.c +++ b/drivers/net/ethernet/cavium/common/cavium_ptp.c @@ -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; |