diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-07-24 15:09:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-25 02:10:13 +0200 |
commit | 623b57bec7c8daf89623c95cd9cc919e4090c9da (patch) | |
tree | af41eb1f300e86f618ef7a4cb5d66ba14ca10dd4 /net/sctp | |
parent | net: openvswitch: fixes potential deadlock in dp cleanup code (diff) | |
download | linux-623b57bec7c8daf89623c95cd9cc919e4090c9da.tar.xz linux-623b57bec7c8daf89623c95cd9cc919e4090c9da.zip |
sctp: remove redundant initialization of variable status
The variable status is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed. Also put the variable declarations into
reverse christmas tree order.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/protocol.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 7ecaf7d575c0..d19db22262fd 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -1367,15 +1367,15 @@ static struct pernet_operations sctp_ctrlsock_ops = { /* Initialize the universe into something sensible. */ static __init int sctp_init(void) { - int i; - int status = -EINVAL; - unsigned long goal; - unsigned long limit; unsigned long nr_pages = totalram_pages(); + unsigned long limit; + unsigned long goal; + int max_entry_order; + int num_entries; int max_share; + int status; int order; - int num_entries; - int max_entry_order; + int i; sock_skb_cb_check_size(sizeof(struct sctp_ulpevent)); |