Commit b8d90937 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by David S. Miller

net: marvell: octeontx2: simplify the otx2_ptp_adjfine()

Simplify the return expression.
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 965b8b2b
...@@ -12,7 +12,6 @@ static int otx2_ptp_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm) ...@@ -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, struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
ptp_info); ptp_info);
struct ptp_req *req; struct ptp_req *req;
int err;
if (!ptp->nic) if (!ptp->nic)
return -ENODEV; return -ENODEV;
...@@ -24,11 +23,7 @@ static int otx2_ptp_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm) ...@@ -24,11 +23,7 @@ static int otx2_ptp_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm)
req->op = PTP_OP_ADJFINE; req->op = PTP_OP_ADJFINE;
req->scaled_ppm = scaled_ppm; req->scaled_ppm = scaled_ppm;
err = otx2_sync_mbox_msg(&ptp->nic->mbox); return otx2_sync_mbox_msg(&ptp->nic->mbox);
if (err)
return err;
return 0;
} }
static u64 ptp_cc_read(const struct cyclecounter *cc) static u64 ptp_cc_read(const struct cyclecounter *cc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment