[PATCH v2 056/148] net/ice/base: remove dead code from ice_get_ddp_pkg_state

Anatoly Burakov anatoly.burakov at intel.com
Wed Jun 12 17:00:50 CEST 2024


From: Ian Stokes <ian.stokes at intel.com>

Removed "else" statement in ice_get_ddp_pkg_state() as it may never happen.

Signed-off-by: Adrian Pielech<adrian.pielech at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
---
 drivers/net/ice/base/ice_ddp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c
index fcf6dc69e3..5a0cf4d54f 100644
--- a/drivers/net/ice/base/ice_ddp.c
+++ b/drivers/net/ice/base/ice_ddp.c
@@ -1205,11 +1205,8 @@ ice_get_ddp_pkg_state(struct ice_hw *hw, bool already_loaded)
 	} else if (hw->active_pkg_ver.major != ICE_PKG_SUPP_VER_MAJ ||
 		   hw->active_pkg_ver.minor != ICE_PKG_SUPP_VER_MNR) {
 		return ICE_DDP_PKG_ALREADY_LOADED_NOT_SUPPORTED;
-	} else if (hw->active_pkg_ver.major == ICE_PKG_SUPP_VER_MAJ &&
-		   hw->active_pkg_ver.minor == ICE_PKG_SUPP_VER_MNR) {
+	} else {
 		return ICE_DDP_PKG_COMPATIBLE_ALREADY_LOADED;
-	} else {
-		return ICE_DDP_PKG_ERR;
 	}
 }
 
-- 
2.43.0



More information about the dev mailing list