summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 1c4b0468bc2c..a3eea6e0b30a 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1123,8 +1123,10 @@ set_sndbuf:
case SO_TIMESTAMPING_OLD:
if (optlen == sizeof(timestamping)) {
if (copy_from_sockptr(&timestamping, optval,
- sizeof(timestamping)))
- return -EFAULT;
+ sizeof(timestamping))) {
+ ret = -EFAULT;
+ break;
+ }
} else {
memset(&timestamping, 0, sizeof(timestamping));
timestamping.flags = val;