* [PATCH net-next] net: cavium: clean up return value check in cavium_ptp_probe
@ 2018-11-22 13:27 YueHaibing
2018-11-24 1:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-11-22 13:27 UTC (permalink / raw)
To: davem, rad, aleksey.makarov, pombredanne, jglauber
Cc: linux-kernel, netdev, YueHaibing
ptp_clock_register never return NULL, so no need check this
in cavium_ptp_probe.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/ethernet/cavium/common/cavium_ptp.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/cavium/common/cavium_ptp.c b/drivers/net/ethernet/cavium/common/cavium_ptp.c
index 6aeb104..73632b8 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;
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: cavium: clean up return value check in cavium_ptp_probe
2018-11-22 13:27 [PATCH net-next] net: cavium: clean up return value check in cavium_ptp_probe YueHaibing
@ 2018-11-24 1:26 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-11-24 1:26 UTC (permalink / raw)
To: yuehaibing
Cc: rad, aleksey.makarov, pombredanne, jglauber, linux-kernel, netdev
From: YueHaibing <yuehaibing@huawei.com>
Date: Thu, 22 Nov 2018 21:27:19 +0800
> ptp_clock_register never return NULL, so no need check this
> in cavium_ptp_probe.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-24 1:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-22 13:27 [PATCH net-next] net: cavium: clean up return value check in cavium_ptp_probe YueHaibing
2018-11-24 1:26 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).