netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ice: fix an error code in ice_ena_vfs()
@ 2021-10-13  8:00 Dan Carpenter
  2021-10-14  9:05 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-10-13  8:00 UTC (permalink / raw)
  To: Jesse Brandeburg, Grzegorz Nitka
  Cc: Tony Nguyen, David S. Miller, Jakub Kicinski, Grzegorz Nitka,
	Wojciech Drewek, intel-wired-lan, netdev, kernel-janitors

Return the error code if ice_eswitch_configure() fails.  Don't return
success.

Fixes: 1c54c839935b ("ice: enable/disable switchdev when managing VFs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 4d0b643906ff..2bd783ec685c 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -1975,7 +1975,8 @@ static int ice_ena_vfs(struct ice_pf *pf, u16 num_vfs)
 
 	clear_bit(ICE_VF_DIS, pf->state);
 
-	if (ice_eswitch_configure(pf))
+	ret = ice_eswitch_configure(pf);
+	if (ret)
 		goto err_unroll_sriov;
 
 	return 0;
-- 
2.20.1


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

* Re: [PATCH net-next] ice: fix an error code in ice_ena_vfs()
  2021-10-13  8:00 [PATCH net-next] ice: fix an error code in ice_ena_vfs() Dan Carpenter
@ 2021-10-14  9:05 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2021-10-14  9:05 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jesse Brandeburg, Grzegorz Nitka, Tony Nguyen, David S. Miller,
	Jakub Kicinski, Wojciech Drewek, intel-wired-lan, netdev,
	kernel-janitors

On Wed, Oct 13, 2021 at 11:00:12AM +0300, Dan Carpenter wrote:
> Return the error code if ice_eswitch_configure() fails.  Don't return
> success.
> 
> Fixes: 1c54c839935b ("ice: enable/disable switchdev when managing VFs")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>

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

end of thread, other threads:[~2021-10-14  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-13  8:00 [PATCH net-next] ice: fix an error code in ice_ena_vfs() Dan Carpenter
2021-10-14  9:05 ` Simon Horman

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).