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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/sfc_efx/base/efx_np.c
b/drivers/common/sfc_efx/base/efx_np.c
index da2a158142..fd4432a2a4 100644
--- a/drivers/common/sfc_efx/base/efx_np.c
+++ b/drivers/common/sfc_efx/base/efx_np.c
@@ -504,7 +504,7 @@ efx_np_sw_link_mode_to_cap(
return (0);
}
-static void
+__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,
__in unsigned int hw_sw_map_nentries,
--
2.47.3