Skip to content

Commit

Permalink
net: marvell: octeontx2: simplify the otx2_ptp_adjfine()
Browse files Browse the repository at this point in the history
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zheng Yongjun authored and David S. Miller committed Dec 10, 2020
1 parent 965b8b2 commit b8d9093
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit b8d9093

Please sign in to comment.