diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-11-22 14:27:19 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-24 02:26:07 +0100 |
commit | 53b44cb9220e4ff7e3c091d91c94b2872b2f62d1 (patch) | |
tree | 85225422e3e64eea6f49d441aba987a5331ead26 | |
parent | net: phy: vitesse: remove duplicate support for VSC8574 (diff) | |
download | linux-53b44cb9220e4ff7e3c091d91c94b2872b2f62d1.tar.xz linux-53b44cb9220e4ff7e3c091d91c94b2872b2f62d1.zip |
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>
-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; |