Message ID | 57779d2f-0d39-4c2e-8718-3c9242177013@web.de (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | netlink: Adjustments for __netlink_kernel_create() | expand |
On Sun, 31 Dec 2023 18:46:09 +0100 Markus Elfring <Markus.Elfring@web.de> wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Sun, 31 Dec 2023 17:45:00 +0100 > > The variable “listeners” will eventually be set to an appropriate pointer > a bit later. Thus omit the explicit initialisation at the beginning. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> This looks OK, and the compiler would catch if it was a problem. Not really necessary though. Acked-by: Stephen Hemminger <stephen@networkplumber.org>
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index b71d9c21d15b..cfddc9c6a376 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -2018,7 +2018,7 @@ __netlink_kernel_create(struct net *net, int unit, struct module *module, struct socket *sock; struct sock *sk; struct netlink_sock *nlk; - struct listeners *listeners = NULL; + struct listeners *listeners; struct mutex *cb_mutex = cfg ? cfg->cb_mutex : NULL; unsigned int groups;