* [PATCH][next] netfilter: nf_log_bridge: Fix missing assignment of ret on a call to nf_log_register
@ 2021-03-31 14:26 Colin King
2021-03-31 14:47 ` Florian Westphal
2021-03-31 18:29 ` Pablo Neira Ayuso
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-03-31 14:26 UTC (permalink / raw)
To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
David S . Miller, Jakub Kicinski, netfilter-devel, coreteam,
netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently the call to nf_log_register is returning an error code that
is not being assigned to ret and yet ret is being checked. Fix this by
adding in the missing assignment.
Addresses-Coverity: ("Logically dead code")
Fixes: 8d02e7da87a0 ("netfilter: nf_log_bridge: merge with nf_log_syslog")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/netfilter/nf_log_syslog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_log_syslog.c b/net/netfilter/nf_log_syslog.c
index 025ab9c66d13..2518818ed479 100644
--- a/net/netfilter/nf_log_syslog.c
+++ b/net/netfilter/nf_log_syslog.c
@@ -1042,7 +1042,7 @@ static int __init nf_log_syslog_init(void)
if (ret < 0)
goto err4;
- nf_log_register(NFPROTO_BRIDGE, &nf_bridge_logger);
+ ret = nf_log_register(NFPROTO_BRIDGE, &nf_bridge_logger);
if (ret < 0)
goto err5;
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][next] netfilter: nf_log_bridge: Fix missing assignment of ret on a call to nf_log_register
2021-03-31 14:26 [PATCH][next] netfilter: nf_log_bridge: Fix missing assignment of ret on a call to nf_log_register Colin King
@ 2021-03-31 14:47 ` Florian Westphal
2021-03-31 18:29 ` Pablo Neira Ayuso
1 sibling, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2021-03-31 14:47 UTC (permalink / raw)
To: Colin King
Cc: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
David S . Miller, Jakub Kicinski, netfilter-devel, coreteam,
netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the call to nf_log_register is returning an error code that
> is not being assigned to ret and yet ret is being checked. Fix this by
> adding in the missing assignment.
Thanks for catching this.
Acked-by: Florian Westphal <fw@strlen.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] netfilter: nf_log_bridge: Fix missing assignment of ret on a call to nf_log_register
2021-03-31 14:26 [PATCH][next] netfilter: nf_log_bridge: Fix missing assignment of ret on a call to nf_log_register Colin King
2021-03-31 14:47 ` Florian Westphal
@ 2021-03-31 18:29 ` Pablo Neira Ayuso
1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2021-03-31 18:29 UTC (permalink / raw)
To: Colin King
Cc: Jozsef Kadlecsik, Florian Westphal, David S . Miller,
Jakub Kicinski, netfilter-devel, coreteam, netdev,
kernel-janitors, linux-kernel
On Wed, Mar 31, 2021 at 03:26:06PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the call to nf_log_register is returning an error code that
> is not being assigned to ret and yet ret is being checked. Fix this by
> adding in the missing assignment.
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-31 18:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 14:26 [PATCH][next] netfilter: nf_log_bridge: Fix missing assignment of ret on a call to nf_log_register Colin King
2021-03-31 14:47 ` Florian Westphal
2021-03-31 18:29 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).