netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] qed/qed_sriov: propagate errors from qed_init_run in enable_vf_access
@ 2023-04-20  8:20 Daniil Tatianin
  2023-04-21  2:56 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Daniil Tatianin @ 2023-04-20  8:20 UTC (permalink / raw)
  To: Ariel Elior
  Cc: Daniil Tatianin, Manish Chopra, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Yuval Mintz, netdev, linux-kernel

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@yandex-team.ru>
---
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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-21  2:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20  8:20 [PATCH net] qed/qed_sriov: propagate errors from qed_init_run in enable_vf_access Daniil Tatianin
2023-04-21  2:56 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).