Explorar o código

netfilter: nf_conntrack_standalone: Fix set-but-unused variables.

The variable 'ret' is set but unused in ct_seq_show().

This was obviously meant to be used to propagate error codes
to the caller, so make it so.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller %!s(int64=14) %!d(string=hai) anos
pai
achega
d88d7de098
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      net/netfilter/nf_conntrack_standalone.c

+ 1 - 1
net/netfilter/nf_conntrack_standalone.c

@@ -245,7 +245,7 @@ static int ct_seq_show(struct seq_file *s, void *v)
 	ret = 0;
 release:
 	nf_ct_put(ct);
-	return 0;
+	return ret;
 }
 
 static const struct seq_operations ct_seq_ops = {