Fix error return for setsockopt(SO_TIMESTAMPING)
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Mon, 20 Jul 2009 00:47:04 +0000 (00:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jul 2009 15:23:36 +0000 (08:23 -0700)
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 <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c

index d9eec153d5313df7c903365aef3341166ea1f340..bbb25be7ddfe614432ca8627ba4cbe791f57d569 100644 (file)
@@ -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,