Merge branch 'small-fixes-for-true-expression-checks'

Jean Sacren says:

====================
Small fixes for true expression checks

This series fixes checks of true !rc expression.
====================

Link: https://lore.kernel.org/r/cover.1634974124.git.sakiwit@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2021-10-25 19:11:17 -07:00
commit 36d935a0a6
2 changed files with 3 additions and 3 deletions

View File

@ -3992,7 +3992,7 @@ static int qed_hw_get_resc(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
} else if (rc == -EINVAL) { } else if (rc == -EINVAL) {
DP_INFO(p_hwfn, DP_INFO(p_hwfn,
"Skip the max values setting of the soft resources since the resource lock is not supported by the MFW\n"); "Skip the max values setting of the soft resources since the resource lock is not supported by the MFW\n");
} else if (!rc && !resc_lock_params.b_granted) { } else if (!resc_lock_params.b_granted) {
DP_NOTICE(p_hwfn, DP_NOTICE(p_hwfn,
"Failed to acquire the resource lock for the resource allocation commands\n"); "Failed to acquire the resource lock for the resource allocation commands\n");
return -EBUSY; return -EBUSY;

View File

@ -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"); DP_INFO(p_hwfn, "PF doesn't have lock ownership\n");
return -EBUSY; return -EBUSY;
} else if (!rc && !params.b_granted) { } else if (!params.b_granted) {
DP_INFO(p_hwfn, "Failed to acquire ptp resource lock\n"); DP_INFO(p_hwfn, "Failed to acquire ptp resource lock\n");
return -EBUSY; return -EBUSY;
} }
return rc; return 0;
} }
static int qed_ptp_res_unlock(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) static int qed_ptp_res_unlock(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)