netfilter: log: Check param to avoid overflow in nf_log_set
[cascardo/linux.git] / net / ipv4 / netfilter / nf_log_arp.c
index cf8f2d4..8945c26 100644 (file)
@@ -111,8 +111,7 @@ static struct nf_logger nf_arp_logger __read_mostly = {
 
 static int __net_init nf_log_arp_net_init(struct net *net)
 {
-       nf_log_set(net, NFPROTO_ARP, &nf_arp_logger);
-       return 0;
+       return nf_log_set(net, NFPROTO_ARP, &nf_arp_logger);
 }
 
 static void __net_exit nf_log_arp_net_exit(struct net *net)