From: Yang Ruibin <11162571@vivo.com>
To: Steffen Klassert <steffen.klassert@secunet.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com, Yang Ruibin <11162571@vivo.com>
Subject: [PATCH v1] net:xfrm:use IS_ERR() with __xfrm_policy_eval_candidates()
Date: Wed, 21 Aug 2024 07:38:06 -0400 [thread overview]
Message-ID: <20240821113808.6744-1-11162571@vivo.com> (raw)
__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
next reply other threads:[~2024-08-21 11:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 11:38 Yang Ruibin [this message]
2024-08-21 12:11 ` Steffen Klassert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240821113808.6744-1-11162571@vivo.com \
--to=11162571@vivo.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=pabeni@redhat.com \
--cc=steffen.klassert@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®