From: Andy Moreton <[email protected]>
Code analysis reports returning uninitialised memory in *enum_hwp.
Fix the annotations to show that the write only occurs on successful
return.
Fixes: 2be7d23f3fe6 ("common/sfc_efx/base: fill in loopback modes on netport
probe")
Cc: [email protected]
Signed-off-by: Andy Moreton <[email protected]>
Reviewed-by: Ivan Malov <[email protected]>
Reviewed-by: Viacheslav Galaktionov <[email protected]>
---
drivers/common/sfc_efx/base/efx_np.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/common/sfc_efx/base/efx_np.c
b/drivers/common/sfc_efx/base/efx_np.c
index 8b8e37c0e1..6cf5aeac11 100644
--- a/drivers/common/sfc_efx/base/efx_np.c
+++ b/drivers/common/sfc_efx/base/efx_np.c
@@ -504,6 +504,7 @@ efx_np_sw_link_mode_to_cap(
return (0);
}
+__success(*supportedp != 0)
static void
efx_np_cap_enum_sw_to_hw(
__in_ecount(hw_sw_map_nentries) const struct efx_np_cap_map *hw_sw_map,
--
2.47.3