Skip to content

Commit

Permalink
net: cavium: clean up return value check in cavium_ptp_probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
YueHaibing authored and David S. Miller committed Nov 24, 2018
1 parent 21f4946 commit 53b44cb
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/net/ethernet/cavium/common/cavium_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 53b44cb

Please sign in to comment.