From: Simon Horman <horms@kernel.org>
To: Yue Haibing <yuehaibing@huawei.com>
Cc: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Kuniyuki Iwashima <kuniyu@google.com>
Subject: Re: [PATCH net-next] ipv6: mcast: Remove unnecessary null check in ip6_mc_find_dev()
Date: Mon, 14 Jul 2025 13:29:27 +0100 [thread overview]
Message-ID: <20250714122927.GM721198@horms.kernel.org> (raw)
In-Reply-To: <20250714081732.3109764-1-yuehaibing@huawei.com>
+ Iwashima-san
On Mon, Jul 14, 2025 at 04:17:32PM +0800, Yue Haibing wrote:
> These is no need to check null for idev before return NULL.
>
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> ---
> net/ipv6/mcast.c | 3 ---
> 1 file changed, 3 deletions(-)
This appears to be a side effect of
commit e6e14d582dd2 ("ipv6: mcast: Don't hold RTNL for MCAST_ socket options.")
I've CCed Iwashimsa-san, who wrote that patch.
But in any case this looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
> diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
> index e95273ffb2f5..8aecdd85a6ae 100644
> --- a/net/ipv6/mcast.c
> +++ b/net/ipv6/mcast.c
> @@ -329,9 +329,6 @@ static struct inet6_dev *ip6_mc_find_dev(struct net *net,
> idev = in6_dev_get(dev);
> dev_put(dev);
>
> - if (!idev)
> - return NULL;
> -
> return idev;
> }
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-07-14 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 8:17 Yue Haibing
2025-07-14 12:29 ` Simon Horman [this message]
2025-07-14 16:39 ` Kuniyuki Iwashima
2025-07-15 23:40 ` patchwork-bot+netdevbpf
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=20250714122927.GM721198@horms.kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yuehaibing@huawei.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®