[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181122132719.8100-1-yuehaibing@huawei.com>
Date: Thu, 22 Nov 2018 21:27:19 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <davem@...emloft.net>, <rad@...ihalf.com>,
<aleksey.makarov@...ium.com>, <pombredanne@...b.com>,
<jglauber@...ium.com>
CC: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH net-next] 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@...wei.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
Powered by blists - more mailing lists