net: Fix fall through warning in y2038 tstamp changes.
authorDavid S. Miller <davem@davemloft.net>
Mon, 4 Feb 2019 04:25:31 +0000 (20:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Feb 2019 04:25:31 +0000 (20:25 -0800)
net/core/sock.c: In function 'sock_setsockopt':
net/core/sock.c:914:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   sock_set_flag(sk, SOCK_TSTAMP_NEW);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/sock.c:915:2: note: here
  case SO_TIMESTAMPING_OLD:
  ^~~~

Fixes: 9718475e6908 ("socket: Add SO_TIMESTAMPING_NEW")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c

index a8904ae40713434ebb009eb0de4d248aedd6fe77..71ded4d8025c187d83a47b14affd3eaac2b7e976 100644 (file)
@@ -912,6 +912,7 @@ set_rcvbuf:
 
        case SO_TIMESTAMPING_NEW:
                sock_set_flag(sk, SOCK_TSTAMP_NEW);
+               /* fall through */
        case SO_TIMESTAMPING_OLD:
                if (val & ~SOF_TIMESTAMPING_MASK) {
                        ret = -EINVAL;