[PATCH net] qed/qed_sriov: propagate errors from qed_init_run in enable_vf_access

From: Daniil Tatianin
Date: Thu Apr 20 2023 - 04:20:34 EST


The return value was silently ignored, and not propagated to the caller.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Fixes: 1408cc1fa48c ("qed: Introduce VFs")
Signed-off-by: Daniil Tatianin <d-tatianin@xxxxxxxxxxxxxx>
---
I'm not familiar enough with the code to know if there's anything we
have to undo here in case qed_init_run returns an error. Any additional
comments are appreciated.
---
drivers/net/ethernet/qlogic/qed/qed_sriov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
index fa167b1aa019..5244d7208eb4 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
@@ -814,7 +814,7 @@ static int qed_iov_enable_vf_access(struct qed_hwfn *p_hwfn,
SET_FIELD(igu_vf_conf, IGU_VF_CONF_PARENT, p_hwfn->rel_pf_id);
STORE_RT_REG(p_hwfn, IGU_REG_VF_CONFIGURATION_RT_OFFSET, igu_vf_conf);

- qed_init_run(p_hwfn, p_ptt, PHASE_VF, vf->abs_vf_id,
+ rc = qed_init_run(p_hwfn, p_ptt, PHASE_VF, vf->abs_vf_id,
p_hwfn->hw_info.hw_mode);

/* unpretend */
--
2.25.1