summaryrefslogtreecommitdiff
path: root/net/sctp/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/sysctl.c')
-rw-r--r--net/sctp/sysctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index cc12162ba091..12c7e01c2677 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -447,8 +447,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;