net: xfrm: Fix end of loop tests for list_for_each_entry
Subsystems (3)
PATCH 1/1 net: xfrm: Fix end of loop tests for list_for_each_entry
The list_for_each_entry() iterator, "pos" in this code, can never be NULL so the warning will never be printed.
Signed-off-by Harshvardhan Jha <[email protected]>
---
From static analysis. Not tested.
--- net/xfrm/xfrm_ipcomp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/xfrm/xfrm_ipcomp.c +1 -1
@@ -241,7 +241,7 @@ static void ipcomp_free_tfms(struct crypto_comp * __percpu *tfms)break ; } -WARN_ON (!pos); +WARN_ON (list_entry_is_head (pos, &ipcomp_tfms_list, list));if (--pos->users)return ;
Signature · 1 line
2.32.0
Quoted 4 lines · Harshvardhan Jha
The
list_for_each_entry()iterator, "pos" in this code, can never be NULL so the warning will never be printed.Signed-off-by Harshvardhan Jha <[email protected]>
Applied, thanks!