From: Yue Haibing <yuehaibing@huawei.com>
To: <davem@davemloft.net>, <dsahern@kernel.org>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<horms@kernel.org>, <kuniyu@google.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<yuehaibing@huawei.com>
Subject: [PATCH net-next] ipv6: mcast: Remove unnecessary null check in mld_del_delrec()
Date: Sat, 12 Jul 2025 17:28:11 +0800 [thread overview]
Message-ID: <20250712092811.2992283-1-yuehaibing@huawei.com> (raw)
These is no need to check null for pmc twice.
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
net/ipv6/mcast.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 6c875721d423..f3dae72aa9d3 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -794,9 +794,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
rcu_assign_pointer(pmc_prev->next, pmc->next);
else
rcu_assign_pointer(idev->mc_tomb, pmc->next);
- }
- if (pmc) {
im->idev = pmc->idev;
if (im->mca_sfmode == MCAST_INCLUDE) {
tomb = rcu_replace_pointer(im->mca_tomb,
--
2.34.1
next reply other threads:[~2025-07-12 9:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-12 9:28 Yue Haibing [this message]
2025-07-12 19:32 ` Markus Elfring
2025-07-14 1:33 ` Yue Haibing
2025-07-12 22:12 ` Kuniyuki Iwashima
2025-07-14 1:32 ` Yue Haibing
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=20250712092811.2992283-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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®