Skip to content

Commit

Permalink
net: xfrm: Fix end of loop tests for list_for_each_entry
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Steffen Klassert <[email protected]>
  • Loading branch information
Harshvardhan Jha authored and klassert committed Jul 26, 2021
1 parent 7cb7458 commit 480e93e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/xfrm/xfrm_ipcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 480e93e

Please sign in to comment.