mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 02:54:32 +08:00
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:
parent
21f4946846
commit
53b44cb922
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user