diff options
-rw-r--r-- | net/sctp/sysctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c index 533b8b2b26ef..dfa532f00d88 100644 --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c @@ -423,8 +423,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write, tbl.data = &net->sctp.auth_enable; ret = proc_dointvec(&tbl, write, buffer, lenp, ppos); - - if (write) { + if (write && ret == 0) { struct sock *sk = net->sctp.ctl_sock; net->sctp.auth_enable = new_value; |