From: Pablo Neira Ayuso Date: Thu, 30 Oct 2014 17:39:12 +0000 (+0100) Subject: netfilter: nf_log: fix sparse warning in nf_logger_find_get() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=c5a589cc3034d035e8490216a45abd3a3b3cd85e;p=deliverable%2Flinux.git netfilter: nf_log: fix sparse warning in nf_logger_find_get() net/netfilter/nf_log.c:157:16: warning: incorrect type in assignment (different address spaces) net/netfilter/nf_log.c:157:16: expected struct nf_logger *logger net/netfilter/nf_log.c:157:16: got struct nf_logger [noderef] * Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index 9562e393fdf7..49a64174f3f1 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c @@ -154,8 +154,7 @@ int nf_logger_find_get(int pf, enum nf_log_type type) struct nf_logger *logger; int ret = -ENOENT; - logger = loggers[pf][type]; - if (logger == NULL) + if (rcu_access_pointer(loggers[pf][type]) == NULL) request_module("nf-logger-%u-%u", pf, type); rcu_read_lock();