[01/10] net/ixgbe/base: fix TSAM checking return value

Message ID 20250114101024.159941-2-yuanx.wang@intel.com (mailing list archive)
State Accepted
Delegated to: Bruce Richardson
Headers
Series update net/ixgbe base driver |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Yuan Wang Jan. 14, 2025, 10:10 a.m. UTC
From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>

The return value of ixgbe_get_fw_tsam_mode function may be a large integer
that does not match the desired bool type.

Fixes: 316637762a5f (net/ixgbe/base: enable E610 device)
Cc: stable@dpdk.org

Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_api.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/ixgbe/base/ixgbe_api.c b/drivers/net/ixgbe/base/ixgbe_api.c
index b4920867bc..ffff670dd3 100644
--- a/drivers/net/ixgbe/base/ixgbe_api.c
+++ b/drivers/net/ixgbe/base/ixgbe_api.c
@@ -1168,8 +1168,9 @@  s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build,
  */
 bool ixgbe_get_fw_tsam_mode(struct ixgbe_hw *hw)
 {
-	return ixgbe_call_func(hw, hw->mac.ops.get_fw_tsam_mode, (hw),
-			       IXGBE_NOT_IMPLEMENTED);
+	if (hw->mac.ops.get_fw_tsam_mode)
+		return hw->mac.ops.get_fw_tsam_mode(hw);
+	return false;
 }
 
 /**