提交 165f8e82 编写于 作者: J Jean Sacren 提交者: Jakub Kicinski

net: qed_ptp: fix check of true !rc expression

Remove the check of !rc in (!rc && !params.b_granted) since it is always
true.

We should also use constant 0 for return.
Signed-off-by: NJean Sacren <sakiwit@gmail.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 e43b76ab
......@@ -63,12 +63,12 @@ static int qed_ptp_res_lock(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
DP_INFO(p_hwfn, "PF doesn't have lock ownership\n");
return -EBUSY;
} else if (!rc && !params.b_granted) {
} else if (!params.b_granted) {
DP_INFO(p_hwfn, "Failed to acquire ptp resource lock\n");
return -EBUSY;
}
return rc;
return 0;
}
static int qed_ptp_res_unlock(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册