mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] net:xfrm:use IS_ERR() with __xfrm_policy_eval_candidates()
@ 2024-08-21 11:38 Yang Ruibin
  2024-08-21 12:11 ` Steffen Klassert
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Ruibin @ 2024-08-21 11:38 UTC (permalink / raw)
  To: Steffen Klassert, Herbert Xu, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
  Cc: opensource.kernel, Yang Ruibin

__xfrm_policy_eval_candidates() function maybe returns
error pointers,So use IS_ERR() to check it.

Signed-off-by: Yang Ruibin <11162571@vivo.com>
---
 net/xfrm/xfrm_policy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index c56c61b0c12e..2e412a48b981 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2156,7 +2156,7 @@ xfrm_policy_eval_candidates(struct xfrm_pol_inexact_candidates *cand,
 		tmp = __xfrm_policy_eval_candidates(cand->res[i],
 						    prefer,
 						    fl, type, family, if_id);
-		if (!tmp)
+		if (IS_ERR(tmp))
 			continue;
 
 		if (IS_ERR(tmp))
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-21 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-21 11:38 [PATCH v1] net:xfrm:use IS_ERR() with __xfrm_policy_eval_candidates() Yang Ruibin
2024-08-21 12:11 ` Steffen Klassert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®