From: Rémi Denis-Courmont Date: Mon, 20 Jul 2009 00:47:04 +0000 (+0000) Subject: Fix error return for setsockopt(SO_TIMESTAMPING) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f249fb783092471a4808e5fc5bda071d2724810d;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Fix error return for setsockopt(SO_TIMESTAMPING) I guess it should be -EINVAL rather than EINVAL. I have not checked when the bug came in. Perhaps a candidate for -stable? Signed-off-by: Rémi Denis-Courmont Signed-off-by: David S. Miller --- diff --git a/net/core/sock.c b/net/core/sock.c index d9eec153d531..bbb25be7ddfe 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -631,7 +631,7 @@ set_rcvbuf: case SO_TIMESTAMPING: if (val & ~SOF_TIMESTAMPING_MASK) { - ret = EINVAL; + ret = -EINVAL; break; } sock_valbool_flag(sk, SOCK_TIMESTAMPING_TX_HARDWARE,