lec: Fix bug introduced by b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
[firefly-linux-kernel-4.4.55.git] / net / sctp / sysctl.c
index 12c7e01c267711ef19878f6c1da1e66e257ecf7e..2e9ada10fd846c10bc6281c30f29cf1fed02ca3c 100644 (file)
@@ -424,8 +424,9 @@ static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write,
                                   void __user *buffer, size_t *lenp,
                                   loff_t *ppos)
 {
-       pr_warn_once("Changing rto_alpha or rto_beta may lead to "
-                    "suboptimal rtt/srtt estimations!\n");
+       if (write)
+               pr_warn_once("Changing rto_alpha or rto_beta may lead to "
+                            "suboptimal rtt/srtt estimations!\n");
 
        return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
 }