[01/10] net/ixgbe/base: fix TSAM checking return value
Checks
Commit Message
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(-)
@@ -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;
}
/**