]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net/packet: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:38:20 +0000 (12:38 -0600)
committerGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 18 May 2021 00:57:18 +0000 (19:57 -0500)
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a break statement instead of letting the code fall
through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
net/packet/af_packet.c

index ba96db1880eae89febf77ba6ff943b054cd268d7..bfd805d6d79d2ba8a0de2706bf8d76d128d0294e 100644 (file)
@@ -1655,6 +1655,7 @@ static int fanout_add(struct sock *sk, struct fanout_args *args)
        case PACKET_FANOUT_ROLLOVER:
                if (type_flags & PACKET_FANOUT_FLAG_ROLLOVER)
                        return -EINVAL;
+               break;
        case PACKET_FANOUT_HASH:
        case PACKET_FANOUT_LB:
        case PACKET_FANOUT_CPU: