diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-09 17:27:26 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-12-09 17:05:37 -0800 |
commit | b8d909375d6fcdc0de9b5f1a7ecee446aeaf5443 (patch) | |
tree | 9be41a7def6d32fd4f51f9118e8767466296711f /drivers | |
parent | 965b8b2bad0acaea6d7b20493394bf80075021a5 (diff) | |
download | linux-b8d909375d6fcdc0de9b5f1a7ecee446aeaf5443.tar.bz2 |
net: marvell: octeontx2: simplify the otx2_ptp_adjfine()
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c index 7bcf5246350f..56390a664517 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c @@ -12,7 +12,6 @@ static int otx2_ptp_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm) struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp, ptp_info); struct ptp_req *req; - int err; if (!ptp->nic) return -ENODEV; @@ -24,11 +23,7 @@ static int otx2_ptp_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm) req->op = PTP_OP_ADJFINE; req->scaled_ppm = scaled_ppm; - err = otx2_sync_mbox_msg(&ptp->nic->mbox); - if (err) - return err; - - return 0; + return otx2_sync_mbox_msg(&ptp->nic->mbox); } static u64 ptp_cc_read(const struct cyclecounter *cc) |